Javascript with mail tags – HELP!!!
-
I was able to get the show/hide function to work in my form if a user selects yes/no in two of the questions. However, I don’t know how to include a mail tag so the answers can be emailed to me after the user hits “submit”. All other questions are emailed to me because they are in brackets with their respective names but i’m not sure how to include the names for the two questions that contain the function. Please see the script below. Can anyone help me? This is where I got my script: https://formidablepro.com/knowledgebase/javascript-examples/
<script type=”text/javascript”>
function showhideForm(showform) {
if (showform == “yes”) {
document.getElementById(“photoupload”).style.display = ‘none’;
}
if (showform == “no”) {
document.getElementById(“photoupload”).style.display = ‘block’;
}
if (showform == “yuppers”) {
document.getElementById(“biotext”).style.display = ‘none’;
}
if (showform == “nope”) {
document.getElementById(“biotext”).style.display = ‘block’;
}
}
</script><p>Your First Name <font color=”red”>*</font>
[text* first-name] </p><p>Your Last Name <font color=”red”>*</font>
[text* last-name] </p><p>Your Email <font color=”red”>*</font>
[email* your-email] </p><p>Do you want to use last years photo? <font color=”red”>*</font>
<input type=”radio” id=”showform” value=”yes” name=”showform” onchange=”showhideForm(this.value);”/>Yes
<input type=”radio” id=”showform” value=”no” name=”showform” onchange=”showhideForm(this.value);”/>No</p><div id=”photoupload” style=”display:none”>
<p>Bio Photo (Please upload a high resolution photo. Required file formats are png or jpg. Max file size is 10mb.)
[file file-biophoto id:not-awesome limit:10mb filetypes:png|jpg|jpeg]</p>
</div><p>Do you want to use last years bio? <font color=”red”>*</font>
<input type=”radio” id=”showform” value=”yuppers” name=”showform” onchange=”showhideForm(this.value);”/>Yes
<input type=”radio” id=”showform” value=”nope” name=”showform” onchange=”showhideForm(this.value);”/>No</p><div id=”biotext” style=”display:none”>
<p>Paste Personal Bio into text box (Limited to 150 words) <font color=”red”>*</font>
[textarea textarea-personalbio /1050]</p>
</div>
- The topic ‘Javascript with mail tags – HELP!!!’ is closed to new replies.