dekonstruct Posted December 12, 2006 Share Posted December 12, 2006 I was wondering if it is possible to put an inputed e-mail address into the subject line of an e-mail that is generated by a form.Here's part of the code where it might be possible:[code]<form action="/cgi-bin/formmail" method="post" id="contactForm" name="contactForm"><input type="hidden" name="required" value="FirstName,LastName,Email,Company,JobTitle,Phone,Preference" /><input type="hidden" name="sort" value="FirstName,LastName,email,Company,JobTitle,JobResponsibilities,Address,Address2,CityTownVillage,StateProvince,ZipPostal,Phone,Preference,Time,IntendedUse,QuestionsComments" /> <input type="hidden" name="subject" value="xxxxx Contact Form," /> <input type="hidden" name="recipient" value="xxxxxxx" /> <input type="hidden" name="redirect" value="xxxxx" /> <fieldset style="padding: 10px;"> <legend style="margin-left: 180px; padding-left: 10px; padding-right: 10px;"> <strong>(<span class="required">*</span>) indicates required field.</strong> </legend> <br /> <label for="FirstName">First Name <span class="required">*</span>:</label> <input name="FirstName" id="FirstName" type="text" class="textfield_medium" /> <br /> <label for="LastName">Last Name <span class="required">*</span>:</label> <input name="LastName" id="LastName" type="text" class="textfield_medium" /> <br /> <label for="Email">E-mail <span class="required">*</span>:</label> <input name="Email" id="Email" type="text" class="textfield_medium" /> <br />[/code]thanks! Link to comment https://forums.phpfreaks.com/topic/30378-solved-form-question/ Share on other sites More sharing options...
ToonMariner Posted December 13, 2006 Share Posted December 13, 2006 yes its just text! Link to comment https://forums.phpfreaks.com/topic/30378-solved-form-question/#findComment-140373 Share on other sites More sharing options...
obsidian Posted December 13, 2006 Share Posted December 13, 2006 Sure, you can. If you have a text entry field named "subject" for the user to input what they want, You simply need to access that data via $_POST['subject'] on your form processing page just as you would for any other form fields. Link to comment https://forums.phpfreaks.com/topic/30378-solved-form-question/#findComment-140377 Share on other sites More sharing options...
dekonstruct Posted December 16, 2006 Author Share Posted December 16, 2006 cool, another good reason to use php! thanks guys! Link to comment https://forums.phpfreaks.com/topic/30378-solved-form-question/#findComment-142163 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.