Title: Javascript with mail tags &#8211; HELP!!!
Last modified: August 30, 2016

---

# Javascript with mail tags – HELP!!!

 *  [mlarge](https://wordpress.org/support/users/mlarge/)
 * (@mlarge)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/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/](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>
 * [https://wordpress.org/plugins/contact-form-7/](https://wordpress.org/plugins/contact-form-7/)

The topic ‘Javascript with mail tags – HELP!!!’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255)
 * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7/reviews/)

## Tags

 * [function](https://wordpress.org/support/topic-tag/function/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [mail tag](https://wordpress.org/support/topic-tag/mail-tag/)
 * [show/hide](https://wordpress.org/support/topic-tag/showhide/)

 * 0 replies
 * 1 participant
 * Last reply from: [mlarge](https://wordpress.org/support/users/mlarge/)
 * Last activity: [10 years, 5 months ago](https://wordpress.org/support/topic/javascript-with-mail-tags-help/)
 * Status: not resolved