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

Forums / Developing with Sitefinity / Contact Us - form builder help

Contact Us - form builder help

4 posts, 0 answered
  1. Meister
    Meister avatar
    262 posts
    Registered:
    09 Nov 2007
    09 Jun 2008
    Link to this post
    Hi

    I'm trying to build a "Contact Us" form builder

    My requirements are as follows

    1) Ability to have more than one form (on different pages)


    2) Control what email address each form goes too.


    I'm trying to spec out exactly what i need to do to acheive this.

    I'm not sure if i need to do this as a custom module, or a user control (or both)

    I imagined i need to have a module that would allow me to create multiple forms, and assign them a label

    And then in page edit mode have a user control that would allow me to choose which form to display on the page (using the label)


    However, i would appreciated if someone could recommend how to implement this technically

    thanks

  2. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    Registered:
    18 Jul 2012
    09 Jun 2008
    Link to this post
    here's a quick and dirty solution that might work:

    1) develop each form as a separate user control, and expose a public property for the email receipient in each one

    2) make another user control as a master with a multiview, one for each form. expose a public enumeration to allow you to choose which view will be active, and another public property which will pass the email from the master control down to the individual form control.

    this assumes you don't have too many forms and that you can build them each (as opposed to some kind of "contact form" module)

    just an idea, hope it's helpful!
  3. Meister
    Meister avatar
    262 posts
    Registered:
    09 Nov 2007
    10 Jun 2008
    Link to this post
    thats for this

    its definatley and option, however, i'm curious how the SF team might go about implemeting this
    perhaps Ivan could comment ?

    cheers
  4. Nigel
    Nigel avatar
    38 posts
    Registered:
    01 Dec 2004
    11 Jun 2008
    Link to this post
    Hi Quade

    I have multiple contact forms targetting different recipients using a single user control. Most elements of the form are configurable through the SiteFinity edit page interface via the control's public properties. For example:

     <Browsable(True)> _ 
        <Category("Email")> _ 
        Public Property EmailTo() As String 
            Get 
                Return _emailto 
            End Get 
            Set(ByVal value As String
                _emailto = value 
            End Set 
        End Property 
     
        <Browsable(True)> _ 
        <Category("Email")> _ 
        Public Property EmailFrom() As String 
            Get 
                Return _defaultfrom 
            End Get 
            Set(ByVal value As String
                _defaultfrom = value 
            End Set 
        End Property 
     
        <Browsable(True)> _ 
        <Category("Email")> _ 
        Public Property EmailHost() As String 
            Get 
                Return _smtphost 
            End Get 
            Set(ByVal value As String
                If Not String.IsNullOrEmpty(value) Then _smtphost = value 
            End Set 
        End Property 

Register for webinar
4 posts, 0 answered