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

Forums / General Discussions / Form2Mail

Form2Mail

6 posts, 0 answered
  1. Meister
    Meister avatar
    262 posts
    Registered:
    09 Nov 2007
    12 Nov 2007
    Link to this post
    Hi

    Has anyone written a contact us form module where you can configure what you want to go on the form?

    that would be a great feature
    Searched the forums but it didn't seem to find anything relevant

  2. bnye
    bnye avatar
    332 posts
    Registered:
    22 Sep 2005
    13 Nov 2007
    Link to this post
    Do you need the data fields to be dynamic? That would be cool, but I haven't reconfigured ours for meta style fields yet. If you would like a Nolics dbclass and corresponding module and client facing usercontrol I would be happy to give you our new one.

    Sincerely,

    Ben

  3. Meister
    Meister avatar
    262 posts
    Registered:
    09 Nov 2007
    13 Nov 2007
    Link to this post
    thanks ben that sounds great if i could grab that off you

    cheers
  4. bnye
    bnye avatar
    332 posts
    Registered:
    22 Sep 2005
    13 Nov 2007
    Link to this post
    I think I posted the latest one at this thread:

    http://www.sitefinity.com/support/forums/support-forum-thread/b1043S-hetbe.aspx

    There is a link to a download and some instructions. It's not as dynamic as we would like. If I were to rewrite it I would use a key, value, validator field set in a contactForm.dbclass so that you could create as many fields as you would like then cycle through them dynamically creating the form. Finally, I would store values with a key value contact.dbclass. That would be a fun project. If you click on the map at alighten.com home page you can see the contact form in a RadWindow. The same control is displayed on the alighten contact page.

    You can download the simple alightenWindow popup UserControl here:

    http://www.alighten.com/Files/blogs/bnye/downloads/Popup_Window_User_Control.zip

    Let me know if you have any questions.

    Sincerely,

    Ben
  5. obirah
    obirah avatar
    7 posts
    Registered:
    30 Jan 2007
    02 Dec 2007
    Link to this post
    Hi Ben,

    thanks a lot for sharing your contact module with us - actually we tried to use it, but we get an error in the AlightenContactConfiguration.cs at line 3:

    public class AlightenContactConfiguration : ConfigurationSection

    We converted all your code to c#, using a code converter. Do you have got any idea why we could get an error at this point?

    Thanks a lot for your help!

    Kind regards,

    Milen
  6. bnye
    bnye avatar
    332 posts
    Registered:
    22 Sep 2005
    03 Dec 2007
    Link to this post
    Hmmm...

    Here is what the contactconfiguration looks like using the Telerik code converterL

    http://converter.telerik.com

    public class AlightenContactConfiguration : ConfigurationSection
    {

     [ConfigurationProperty("serverAddress", IsRequired = true, IsKey = true)]
     public string ServerAddress {
      get { return (string)this("serverAddress"); }
      set { this("serverAddress") = value; }
     }

     [ConfigurationProperty("serverPort", IsRequired = true, IsKey = true)]
     public string ServerPort {
      get { return (string)this("serverPort"); }
      set { this("serverPort") = value; }
     }

     [ConfigurationProperty("serverSpecifyPort", IsRequired = true, IsKey = true)]
     public string ServerSpecifyPort {
      get { return (string)this("serverSpecifyPort"); }
      set { this("serverSpecifyPort") = value; }
     }

     [ConfigurationProperty("serverAuthenticate", IsRequired = true, IsKey = true)]
     public string ServerAuthenticate {
      get { return (string)this("serverAuthenticate"); }
      set { this("serverAuthenticate") = value; }
     }


     [ConfigurationProperty("clientTemplate", IsRequired = true)]
     public string ClientTemplate {
      get { return (string)this("clientTemplate"); }
      set { this("clientTemplate") = value; }
     }

     [ConfigurationProperty("employeeTemplate", IsRequired = true)]
     public string EmployeeTemplate {
      get { return (string)this("employeeTemplate"); }
      set { this("employeeTemplate") = value; }
     }


     [ConfigurationProperty("baseURL", IsRequired = true)]
     public string BaseURL {
      get { return (string)this("baseURL"); }
      set { this("baseURL") = value; }
     }

     [ConfigurationProperty("from", IsRequired = true)]
     public string From {
      get { return (string)this("from"); }
      set { this("from") = value; }
     }

     [ConfigurationProperty("username", IsRequired = true)]
     public string Username {
      get { return (string)this("username"); }
      set { this("username") = value; }
     }

     [ConfigurationProperty("password", IsRequired = true)]
     public string Password {
      get { return (string)this("password"); }
      set { this("password") = value; }
     }

     [ConfigurationProperty("employeeRecipients", IsRequired = true)]
     public string EmployeeRecipients {
      get { return (string)this("employeeRecipients"); }
      set { this("employeeRecipients") = value; }
     }

     [ConfigurationProperty("clientSubject", IsRequired = true)]
     public string ClientSubject {
      get { return (string)this("clientSubject"); }
      set { this("clientSubject") = value; }
     }

     [ConfigurationProperty("employeeSubject", IsRequired = true)]
     public string EmployeeSubject {
      get { return (string)this("employeeSubject"); }
      set { this("employeeSubject") = value; }
     }
    }

    //=======================================================
    //Service provided by Telerik (www.telerik.com)
    //Conversion powered by NRefactory.
    //Built and maintained by Todd Anglin and Telerik
    //=======================================================

    However, I suspect that there is something missing from the web.config. In the config sections you should have

    <sectionGroup name="Alighten">  
          <section name="AlightenContactConfiguration" type="AlightenContactConfiguration"></section> 
    </sectionGroup> 


    And then in the Alighten section:

    <Alighten> 
        <AlightenContactConfiguration   
            serverAddress="mail.alighten.com"   
            serverPort="25" 
            serverSpecifyPort="false"   
            serverAuthenticate="true"   
            clientTemplate="~/Files/templates/contactClientTemplate.html"   
            employeeTemplate="~/Files/templates/contactEmployeeTemplate.html"   
            baseURL="" from="Ben Nye&lt;bnye@alighten.com&gt;"   
            employeeRecipients="Ben Nye&lt;info@alighten.com&gt;;Ben Nye&lt;bnye@alighten.com&gt;"   
            username="bnye@alighten.com"   
            password="yourpassword"   
            clientSubject="Alighten | Request received {1}"   
            employeeSubject="Alighten | New request from {1}" 
        /> 
    </Alighten> 

    I hope this helps. Please do not hesitat to contact me if you have any questions.

    Sincerely,

    Ben
Register for webinar
6 posts, 0 answered