Adding more fields to the contact form..
Posted: 01 March 2007 06:17 AM   [ Ignore ]  
Lab Assistant
Avatar
RankRank
Total Posts:  132
Joined  02-20-2007

Hi all…

Im still pretty much a newbie to EE, so please bare with me if this is something straight forward. I have setup the standard EE contact form and its working fine, however i need more fields than the standard form initially gives. How can i enter more fields such as company, telephone and so on… code i have so far which views but doesnt send all the fields is


{exp:email:contact_form user_recipients=“false” recipients=“brian@scandinaviandesigns.co.uk” charset=“utf-8”}
         
         
              <fieldset>
         
              <label for=“name”>Your Name: **</label>
              <input type=“text” id=“name” name=“name” value=”” />
 
              <label for=“company”>Company:</label>
              <input type=“text” name=“company” id=“company” value=”” />
               
              <label for=“from”>Your Email:</label>
              <input type=“text” id=“from” name=“from” value=”{member_email}” />
         
              <label for=“tel”>Tel:</label>
              <input type=“text” id=“tel” name=“tel” value=“Phone Number” />         
             
              <label for=“message”>Enquiry Details:</label>
              <textarea id=“message” name=“message” rows=“5” cols=“40”></textarea>
             
              <input type=“hidden” name=“issubmitted” value=“true” />
              <input type=“image” name=“submit” class=“button” id=“btnSendMessage” value=“submit” src=”” alt=“submit button”/>
              <input name=“submitted” type=“hidden” id=“submitted” value=“true” />
               
          </fieldset>
         
         
          {/exp:email:contact_form}

 Signature 

Better to regret something you did rather than something you didnt

Profile
 
 
Posted: 01 March 2007 06:28 AM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  16148
Joined  04-29-2002

If you need more fields to a contact form, I suggest you use SolSpace’s FreeForm module.

It’s fairly easy to use and quite powerful. It’s also free. (Donation suggested.)

 Signature 

Most Recent version: 1.6.7 Build 20090515 If needed, also update your forum EE Trial Options - EE Wiki - Docs for updating a build

Profile
MSG
 
 
Posted: 01 March 2007 06:33 AM   [ Ignore ]   [ # 2 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  132
Joined  02-20-2007

Hi Sue,

Yes i have downloaded and installed that… just having a look at it…. my only concern is the database bit…. as in the form_name bit…. as im not a out and out developer…. im wondering where that gets created, specified etc etc…

Do i have to create this part? do i need to delete records from it every so often and so on…

 Signature 

Better to regret something you did rather than something you didnt

Profile
 
 
Posted: 01 March 2007 06:58 AM   [ Ignore ]   [ # 3 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  132
Joined  02-20-2007

Im using this code… but im not getting the company, telephone etc through via email… everything else is fine….

          {exp:email:contact_form user_recipients=“false” recipients=“brian@scandinaviandesigns.co.uk” charset=“utf-8”}
         
         
              <fieldset>
         
              <label for=“name”>Your Name: **</label>
              <input type=“text” id=“name” name=“name” value=”” />
 
              <label for=“message”>Company:</label>
              <input type=“text” name=”[]message” id=“company” value=”” />
               
              <label for=“from”>Your Email:</label>
              <input type=“text” id=“from” name=“from” value=”” />
         
              <label for=“message”>Tel:</label>
              <input type=“text” id=“message” name=”[]message” value=”” />         
             
              <label for=“message”>Enquiry Details:</label>
              <textarea id=“message” name=“message” rows=“5” cols=“40”></textarea>
             
              <input type=“hidden” name=“issubmitted” value=“true” />
              <input type=“image” name=“submit” class=“button” id=“btnSendMessage” value=“submit” src=”” alt=“submit button”/>
              <input name=“submitted” type=“hidden” id=“submitted” value=“true” />
               
          </fieldset>
         
         
          {/exp:email:contact_form}

 Signature 

Better to regret something you did rather than something you didnt

Profile
 
 
Posted: 01 March 2007 07:09 AM   [ Ignore ]   [ # 4 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  16148
Joined  04-29-2002

Yes i have downloaded and installed that… just having a look at it…. my only concern is the database bit…. as in the form_name bit…. as im not a out and out developer…. im wondering where that gets created, specified etc etc…

Do i have to create this part? do i need to delete records from it every so often and so on…

form_name is just a field name you can specify. The author uses Zeus in his examples.

Here’s an example:

{exp:freeform:form form_name="heptite" required="name,email,phone1,phone2" notify="youremail@gmail.com" return="grass_stains/form_thanks" template="heptite_test"}

You can find my form for testing here: FreeForm Test

NOTE: This example doesn’t send back an email to the person who requested it. But you can add that functionality.

In this case I called the form_name heptite, the name of my site. I could have called it JuneBug. smile

You can delete entries when ever.

Image Attachments
freeformentries.jpg
Click thumbnail to see full-size image
 Signature 

Most Recent version: 1.6.7 Build 20090515 If needed, also update your forum EE Trial Options - EE Wiki - Docs for updating a build

Profile
MSG
 
 
Posted: 01 March 2007 09:57 AM   [ Ignore ]   [ # 5 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  5931
Joined  11-23-2003

Thanks Sue.

Flashwiz, let me know if you need anymore examples.

 Signature 

WebmasterBasic: Rent a Webmaster | EE 2.0:  A designers dream becomes a developers dream | Follow me on Twitter.

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 77530 Total Logged-in Users: 41
Total Topics: 101537 Total Anonymous Users: 27
Total Replies: 544310 Total Guests: 291
Total Posts: 645847    
Members ( View Memberlist )