Log in

View Full Version : Form Help


Greenguy
2015-12-30, 02:55 PM
I don't know how to word this so that I can search Google for the answer lol

Here's the top chunk of the form I have (it's too big to post all of it without confusing people):

<FORM action="http://www.tankisgay.com/cgi-bin/markmail.cgi" method="post" onsubmit="return validate()" name="pool" id="pool">
<input type="hidden" name="recipient" value="jenks89@gmail.com">
<input type="hidden" name="email" value="myballs@yourchin.com">
<input type="hidden" name="realname" value="Jenks Fantasy Football Playoff Fest 2016">
<input type="hidden" name="subject" value="Jenks Fantasy Football Playoff Fest 2016">
<input type="hidden" name="redirect" value="http://www.tankisgay.com/pool/thankyou.htm">
<input type="hidden" name="env_report" value="REMOTE_USER,REMOTE_IDENT,REMOTE_HOST,REMOTE_ADDR,HTTP_USER_AGENT">
<div class="input"><label for="Entrant">Your Real Name:</label><input id="Entrant" type="text" maxlength="50" name="Entrant"><div style="clear:both;height:0px;">&nbsp;</div></div>
<div class="input"><label for="EmailAddress">Your Email:</label><input id="EmailAddress" type="text" maxlength="50" name="EmailAddress"><div style="clear:both;height:0px;">&nbsp;</div></div>
<div class="input"><label for="TieBreaker">TieBreaker:</label><input id="TieBreaker" type="text" maxlength="3" name="TieBreaker"><div style="clear:both;height:0px;">&nbsp;</div></div>
<div class="input"><label for="Sponsor">Money/How:</label><input id="Sponsor" type="text" maxlength="50" name="Sponsor"><div style="clear:both;height:0px;">&nbsp;</div></div>

The BOLD parts are what I need help with. What do I put in the value= of this:
<input type="hidden" name="email" value="myballs@yourchin.com">
So that the email address the user inputs in the EmailAddress box:
<input id="EmailAddress" type="text" maxlength="50" name="EmailAddress">
Shows up as the from?
(Obviously, right now I have it set to default to the bogus myballs@yourchin.com email addy)

Thanks In Advance |shake|

Cleo
2015-12-30, 03:59 PM
You need to put a variable in there so that it picks up the senders email address. It might be the code that is in the email address field.

Each script will have a different variable so I can't tell you what it is.

This is what the code looks like on the contact form that I use on blogs. It's totally different than what you need but shows how you use variables when setting up contact forms.
<p>Your Name (required)<br />
[text* your-name] </p>

<p>Your Email (required)<br />
[email* your-email] </p>

<p>Subject<br />
[text your-subject] </p>

<p>Phone Number<br />
[tel tel-834]</p>

Try replacing myballs@yourchin.com with the variable that is in the form field that is in the field that they put their email address in.

Greenguy
2015-12-30, 04:51 PM
So <input type="hidden" name="email" value="EmailAddress"> ??

(...and, Cleo & I are conversing on ICQ as well, so this will probably annoy her to no end lol)

Cleo
2015-12-30, 04:58 PM
<input type="hidden" name="email" value="EmailAddress">

Toby
2015-12-30, 05:50 PM
value= assigns that form field, in this case email, to a specific value. In other words it pre-fills that form field. Since this is a hidden field it is the value that will get sent when form is submitted. You use hidden fields to submit fixed value (or values pulled from databases) rather that value input by the user.