Adding more fields to the contact form..
Posted: 01 March 2007 07:17 AM   [ Ignore ]  
Lab Assistant
Avatar
RankRank
Total Posts:  185
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 07:28 AM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  20997
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 

EE 2.01PB - 2.x Bug Tracker | Docs | Upgrade from 1.x to 2.x | Build Update Instructions | 1.6.x Update Info

Most recent 2.x version: Build 20100215
Don’t forget to upgrade MSM and Forum as needed!

Profile
MSG
 
 
Posted: 01 March 2007 07:33 AM   [ Ignore ]   [ # 2 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  185
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 07:58 AM   [ Ignore ]   [ # 3 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  185
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 08:09 AM   [ Ignore ]   [ # 4 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  20997
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 

EE 2.01PB - 2.x Bug Tracker | Docs | Upgrade from 1.x to 2.x | Build Update Instructions | 1.6.x Update Info

Most recent 2.x version: Build 20100215
Don’t forget to upgrade MSM and Forum as needed!

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

Thanks Sue.

Flashwiz, let me know if you need anymore examples.

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 1743, on December 02, 2009 03:47 PM
Total Registered Members: 120330 Total Logged-in Users: 125
Total Topics: 126457 Total Anonymous Users: 55
Total Replies: 664972 Total Guests: 504
Total Posts: 791429    
Members ( View Memberlist )
Active Members:    .angieAdrianLongAlex HiroshiAndrew MacphersonAt the GatesatiosisawesomebaboonbrandBen BruntbenbennittBennobobiberltdBjorgenbmillerccarterchaasclefevreCompass360creativearcCrucialderDerek JonesdesignerhandbagsDJ NAMDom.SDoug EDrugs.iedubsakEmily Heathemrys.rerfi75Erik ReaganeuetzfensterbabyferroconcreteGareth Daviesgaz2sggesturestudioGreg AkerGrenGuy StephenshearsayhothousegraphixHrimthursikaikahusseyIkirojaasumJörg GudehusJenSkimjmorinjoernJohn CooperJohn Henry Donovanjoshclark17jrattingerkalwebkenny2laskalizLaszlo Gramalisten1999madamovmarcuscrMark BowenMartin BluntMatt HarrismdupreMichael HahnmichaelfbradleyNevin LynenevsieNobis InteractiveOliver NielsenoniracomoxfordOxygen SmithPascal KrietePaul BPaul BryanPauli HuhtiniemiPhil Coffmanpieshoppragnar2ramonekalsawrccjaxregistryResponse1Rick JollyrippeRobb OttenhoffRobin Sowellroi.agnetarunning with scissorsruthhSean McDevittsedevEEsmartpillspinhirneStephen RushingSteve AbrahamSteven GrantSue CrockerSuper McFlytimprintTodd StriomvacquahvobtoaviWaielweblionWes BakerwheyZac G.zackmorgan