Sitefinity ASP.NET CMS
  • Quade avatar

    Posted on Nov 12, 2007 (permalink)

    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

    Reply

  • bnye Master avatar

    Posted on Nov 12, 2007 (permalink)

    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

    Reply

  • Quade avatar

    Posted on Nov 13, 2007 (permalink)

    thanks ben that sounds great if i could grab that off you

    cheers

    Reply

  • bnye Master avatar

    Posted on Nov 13, 2007 (permalink)

    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

    Reply

  • Posted on Dec 2, 2007 (permalink)

    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

    Reply

  • bnye Master avatar

    Posted on Dec 2, 2007 (permalink)

    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

    Reply

About Telerik

Telerik, the publisher of Sitefinity CMS, is leading vendor of ASP.NET AJAX, Silverlight, WinForms and WPF controls and components, as well as .NET Reporting and .NET ORM solutions. Building on its solid expertise in interface development and Microsoft technologies, Telerik helps customers build applications with unparalleled richness, responsiveness and interactivity. Created with passion, Telerik products help thousands of developers every day to be more productive and deliver reliable applications under budget and on time. Read more about Telerik

Copyright © 2002-2009 Telerik. All rights reserved. Powered by Sitefinity