+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Forms Module Notification

Forms Module Notification

59 posts, 0 answered
  1. George
    George  avatar
    204 posts
    Registered:
    05 Sep 2006
    31 Mar 2011
    Link to this post
    Hello guys,

    I managed to make the Forms Module Notification work !

    You can view the designer in the attached image.

    I have created a custom designer for the Forms Control in order to add the email addresses to which the form submission will be sent.

    The smtp settings will be provided in the system config file.

    Special thanks for christine for the base code of this project.

    You can download the working control from http://bit.ly/g0vtGX

    Instructions:

    1- Download the project from the link
    2- Add reference to this project from your Sitefinity project
    3- Open the Sitefinity administration and go to Administration -> Settings -> Advanced -> Toolboxes -> PageControls -> ContentToolboxSection -> FormsControl and set the settings as follows:

    Control type: FormsNotification.FormsControlCustom, FormsNotification
    Name: FormsControlCustom
    Title: Forms Control
    ResourceClassId: clear the textbox

    This will replace the default Forms Control with the Custom Forms Control and you are ready to drop it on your pages.

    To set the smtp settings Go to Administration -> Settings -> Advanced -> System -> SMTP (Email Settings)

    Note: This code has been tested with Sitefinity 4.0 SP 1

    Hope you will find this helpful
  2. Christine
    Christine avatar
    31 posts
    Registered:
    25 Jan 2008
    31 Mar 2011
    Link to this post
    Many, many thanks George!!! 
  3. George
    George  avatar
    204 posts
    Registered:
    05 Sep 2006
    31 Mar 2011
    Link to this post
    I just updated the project again. Added support for more settings from the system.config and also made the designer looks decent

    Image attached. Same download link.

    Cheers
  4. Christine
    Christine avatar
    31 posts
    Registered:
    25 Jan 2008
    31 Mar 2011
    Link to this post
    Many, many thanks George!!!  I did not get a chance to work on this yesterday, but...I'm not sure that I would've gotten it to work anyway.  I've learned a lot from you!  Thanks again!!
  5. Drew Greenwell
    Drew Greenwell avatar
    66 posts
    Registered:
    11 Feb 2010
    01 Apr 2011
    Link to this post
    Good stuff man! You saved us some time. Just a heads up though. This won't display values from custom fields(we have a couple of dropdowns that display Country State etc.). I added another case to the end of your cases in the sendemail method that should take care of it though. The code is sitting on another developer's machine.. but it looks like this
    else if(fld is FieldControl) You can then just grab
    (( FieldControl)fld).Title and (( FieldControl)fld).Value

    Thanks again George!
  6. George
    George  avatar
    204 posts
    Registered:
    05 Sep 2006
    01 Apr 2011
    Link to this post
    Hi Drew,

    You are right. I did not cover the case where there is a custom control. Since all the controls inherit from FieldControl you can simply alter the code and get the values as you suggested. I will update the code.

    Thanks for your suggestion

    P.S: Code updated
  7. William
    William avatar
    108 posts
    Registered:
    15 Feb 2011
    08 Apr 2011
    Link to this post
    George,

    You are awesome.  Thanks for this!

    - William
  8. Gabe Sumner
    Gabe Sumner avatar
    440 posts
    Registered:
    09 Sep 2007
    09 Apr 2011
    Link to this post
    George, you're a hero.  Thank you so much for your contributions!  Hit me up about this (sumner@telerik.com) and we can chat about getting this on the marketplace (if you're interested).  

    In addition, I'm working to hunt up a PITS link related to this overall task.  We'll want to get this entire obstacle addressed in a future release.

    Cheers,

    Gabe Sumner
    Telerik | Sitefinity CMS

  9. Gabe Sumner
    Gabe Sumner avatar
    440 posts
    Registered:
    09 Sep 2007
    09 Apr 2011
    Link to this post
    As promised, here is this feature request's PITS link:

    http://www.telerik.com/support/pits.aspx#/public/sitefinity/5478

    Feel free to track, comment and vote on this story.  Thanks for the suggestion and thank you to everyone who helped contribute to a short-term work-around.

    --

    As it was described to me internally, this task is actually dependent on another task which relates to Sitefinity notifications in general (system errors, new comments, page modifications, stalled workflows, etc.).  There are a lot of events that happen in the CMS where notifications might be desirable.  All of this becomes a bit inter-related.

    Gabe Sumner
    Telerik | Sitefinity CMS
  10. sathiyaseelan
    sathiyaseelan avatar
    82 posts
    Registered:
    26 Aug 2008
    12 Apr 2011
    Link to this post
    Hi George,

    I new to the sitefinity 4. I need to customize the "Form notification module". i.e for example I need to change the subject heading and body in the email. How to do this?
    Also I downloaded the code and email is firing.

    Thanks,
    sathya
  11. George
    George  avatar
    204 posts
    Registered:
    05 Sep 2006
    12 Apr 2011
    Link to this post
    @Gabe: Thank you Gabe, it was certainly a pleasure for me. I have sent you an email already regarding that. Also thanks for the PITS link :)

    @Sathya:

    To modify the subject of the email locate this line of code in the FormsControlCustom and change it

    var subject = String.Format("{0} {1} - Submission", formDescr.ApplicationName.TrimEnd('/'), formDescr.Title);

    I can certainly modify the code and add a field for the subject in the control designer if you'd like.

    If you wanna change the content of the body you'd have to go to the SendEmailMsg function in the same class and change this line of code

    mailMsg.Body = "<div style='font-family: verdana;font-size: .8em;'>" + msgBody + "</div>";

    P.S: I have updated the control. I added a field for the subject to make it editable. I also added an extra option to enable logging for errors when sending emails.
  12. sathiyaseelan
    sathiyaseelan avatar
    82 posts
    Registered:
    26 Aug 2008
    13 Apr 2011
    Link to this post
    Thanks Geo. Looking for a help in many things.
  13. Jasen Bankson
    Jasen Bankson avatar
    2 posts
    Registered:
    08 Sep 2009
    19 Apr 2011
    Link to this post

    i have been using the forms notification module and we just upgraded to version 4.1 and it has stopped working.  The error that we're getting is:

    Server Error in '/' Application.


    The value "System.Web.UI.HtmlControls.HtmlGenericControl" is not of type "Telerik.Sitefinity.Web.UI.DataMemberInfo" and cannot be used in this generic collection.
    Parameter name: value

    it seems to be related to this block in the FormsControlDesigner.ascx file (if i remove the DataMembers section it works, but doesn't show the list of forms...which makes sense since none are defined at that point).

    <sitefinity:FlatSelector id="itemSelector" runat="server"
        ItemType="Telerik.Sitefinity.Forms.Model.FormDescription"
        ItemsFilter="Visible == true AND Status == Live"
        DataKeyNames="Id"
        ShowSelectedFilter="false"
        AllowPaging="false"
        PageSize="10"
        AllowSearching="false"
        ShowProvidersList="false"
        InclueAllProvidersOption="false"
        ServiceUrl="~/Sitefinity/Services/Forms/FormsService.svc" 
        >
        <DataMembers>
            <sitefinity:DataMemberInfo runat="server" Name="Title" IsExtendedSearchField="true" HeaderText="Title">
                <strong>{{Title}}</strong>
            </sitefinity:DataMemberInfo>
        </DataMembers>
    </sitefinity:FlatSelector>

    Is there something in the new version of Sitefinity that is causing this to break?  Any suggestions?

  14. George
    George  avatar
    204 posts
    Registered:
    05 Sep 2006
    20 Apr 2011
    Link to this post
    Hi All,

    I have fixed the error on Sitefinity 4.1 and also fixed another bug related to sending emails to multiple addresses.

    The new version 1.0 will be available on the market place today and will be supporting both 4.0 SP1 and 4.1.

    Thanks,

    George
  15. Jasen Bankson
    Jasen Bankson avatar
    2 posts
    Registered:
    08 Sep 2009
    21 Apr 2011
    Link to this post
    that's great!  Thanks!
  16. John
    John avatar
    12 posts
    Registered:
    01 Nov 2010
    26 Apr 2011
    Link to this post
    Hi

    I have the same problem as Pat. I followed the Newsrotator sample and to register I have  tried the dll filename, and Telerik.Sitefinity, Version=4.0.1098.0, Culture=neutral, PublicKeyToken=b28c218413bdf563, which is what is on the other controls, and all sorts of other combinations   and I still get the it is not resolved error. Is this maybe some other kind of error I made while I was creating the custom control??
  17. John
    John avatar
    12 posts
    Registered:
    01 Nov 2010
    28 Apr 2011
    Link to this post
    So I ended up just creating a trigger directly on the database. It was much easier and works perfectly :)
  18. Ruben
    Ruben avatar
    10 posts
    Registered:
    02 May 2011
    17 May 2011
    Link to this post
    Hi William,

    I have a question about the ImageSelector that you also have implemented. I have the same error, but I do not understand your solution.

    http://www.sitefinity.com/devnet/forums/sitefinity-4-x/general-discussions/error-in-custom-fields-in-4-1.aspx

    Greets,

    Ruben
  19. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    17 May 2011
    Link to this post
    Hello,

    I believe that the required controls are shown in the stack

    "The control must be assignable form type "System.Web.UI.WebControls.TextBox" and must have ID "textBox_write". "


    All the best,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  20. Scott
    Scott avatar
    1 posts
    Registered:
    11 Jan 2010
    17 May 2011
    Link to this post
    Hey William Ivan is right, you can look at the stack trace after you compile and see which exact controls need to be updated. It's a bit time consuming though, because it only tells you the first control that it didnt find.
    The problem is that they adjusted the base class and now you have to adjust your template accordingly (your SimpleImageField.ascx file).

    Look at your template for the conditional section dedicated to Write mode.
    <sitefinity:ConditionalTemplate Left="DisplayMode" Operator="Equal" Right="Write">

    Right after the conditional template starts, there will be several controls. Note that the naming convention of some of the controls already has "Write" in it. You need to adjust the 3 or 4 controls that dont.

    This looks like a list of all the controls we had to update.

    <asp:LinkButton ID="expandButton_write" runat="server" OnClientClick="return false;" CssClass="sfOptionalExpander" />
    ..  
    <asp:Panel ID="expandableTarget_write" runat="server" CssClass="sfFieldWrp">
    ..
    <asp:TextBox ID="textBox_write" runat="server" CssClass="sfTxt" />
     

    ..err this is Drew.
    I posted under the wrong account
    Cheers,
    Drew
  21. Madhavan
    Madhavan avatar
    19 posts
    Registered:
    31 Jan 2011
    01 Jun 2011
    Link to this post
    Hi George,

      Can you please let me know what you fixed. We also wrote a similar control for my project and I am getting the same error as received by "
    Jasen". 

    Thanks
    Madhavan
  22. Dinesh
    Dinesh avatar
    5 posts
    Registered:
    31 May 2011
    02 Jun 2011
    Link to this post
    Hello,

    Is there a way to change the default success message  i.e., "Success! Thanks for filling out our form!"
    that appears after the form is submitted.

    I tried assigning the value to 'SuccessMessageLabel', but it's of no use!

    Thanks,
    Dinesh
  23. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    02 Jun 2011
    Link to this post
    Hello Dinesh,

    Please take a look at this post

    http://www.sitefinity.com/devnet/forums/sitefinity-4-x/bugs-issues/edited-label-not-visible.aspx

    Regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  24. Duneel
    Duneel avatar
    166 posts
    Registered:
    08 Dec 2010
    16 Jun 2011
    Link to this post
    Hi George,

    You are a Genius!! Thanks a lot for creating a super duper sample.

    BTW...I have a question. Is there a way to stop user data being written to Sitefinity backend as responses? Bcoz I'm storing these data on an external database and I dont want to store them in Sitefinity.

    Thanks!
    Duneel
  25. Newton
    Newton avatar
    7 posts
    Registered:
    19 Apr 2011
    24 Jun 2011
    Link to this post
    How do you use the "enable logging" option?  I can't find where the logs are being written to.
  26. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    24 Jun 2011
    Link to this post
    Hi ,

    There are logs in App_Data/Sitefinity/Logs folder.

    Kind regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  27. Majid
    Majid avatar
    17 posts
    Registered:
    02 Jun 2011
    18 Jul 2011
    Link to this post
    Hi all,
    I've used Geroge project, but I need to extend it!
    after submitting a from by a viewer, I want to send an email to Admin and also, another email to client!
    For first email,  George project is fine, but how can handle 2nd?

    Sincerely,
    Majid
  28. George
    George  avatar
    204 posts
    Registered:
    05 Sep 2006
    20 Jul 2011
    Link to this post
    Hey Guys,

    I have just completed the 1.2 version of this widget which includes support for sending an email to the person submitting the form. Read more about this here:

    http://www.gsaadeh.com/blog/post/11-07-20/Forms_Module_Notification_1_2.aspx

    The blog post also includes a video to demonstrate how to setup the widget.

    Cheers
  29. Gary
    Gary avatar
    1 posts
    Registered:
    14 Aug 2008
    01 Aug 2013 in reply to George
    Link to this post
    Quick question, I am not much of sitefinity developer. I have converted this for sitefinity 5.1 but configuration dialog box is not showing control as shown in your screen shot.

    Any help will be appreciated and thx before hand...


     
59 posts, 0 answered
1 2