We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Email contact form not sending radio button and other input values

How Do I?

fanderson's avatar
fanderson
899 posts
about 2 years ago
fanderson's avatar fanderson

I built a basic email contact form following the instructions in the Docs. The form sends fine but only a portion of the form content is included in the email.

Here is the form:

{exp:email:contact_form user_recipients="no" name="csrf_token" value="{CSRF_TOKEN}" form_class="contact-form form-bg-trans" recipients="[email protected]" redirect="2" return="/contact/thank-you" charset="utf-8"}
  
  <input class="visually-hidden" type="text" name="subject" size="40" />
  <input type="text" class="visually-hidden" id="subject" name="subject" value="MHS Website Submission" />

  <label for="name" class="visually-hidden">Name</label>

  <input type="text" class="hn-norm px-2" id="name" name="name" placeholder="Name*" value="" />

  <label for="from" class="visually-hidden">Email</label>

  <input type="text" class="hn-norm px-2" id="from" name="from" placeholder="Email*" value="" />

  <label for="phone" class="visually-hidden">Phone</label>

  <input type="text" class="hn-norm px-2" id="phone" name="phone" placeholder="Phone" value="" />
  
  <fieldset>
   <legend>Are you a new patient?</legend>
   <input type="radio" id="new-yes" name="new" value="yes" />
   <label for="yes">Yes</label>
   
   <input type="radio" id="new-no" name="new" value="no" />
   <label for="no">No</label>
  </fieldset>
  
  <fieldset>
   <legend>Do you want to schedule a regular appointment? </legend>
   <input type="radio" id="schedule-yes" name="new" value="yes" />
   <label for="yes">Yes</label>
   
   <input type="radio" id="schedule-no" name="new" value="no" />
   <label for="no">No</label>
  </fieldset>
  
  <fieldset>
   <legend>Do you want to schedule a free 15-minute consult?</legend>
   <input type="radio" id="consult-yes" name="new" value="yes" />
   <label for="yes">Yes</label>

   <input type="radio" id="consult-no" name="new" value="no" />
   <label for="no">No</label>
  </fieldset>

  <label for="message" class="visually-hidden">How can we help?</label>

  <textarea id="message" name="message" class="hn-norm pt-2 px-2" placeholder="How can we help?"></textarea>
  
  {if captcha}
   Please enter the word you see in the image below:
   {captcha}

   <input class="captcha-fill" type="text" name="captcha" value="" maxlength="15" /></p>
  {/if}

  
   <label for="formSubmit" class="visually-hidden">Submit</label>
   <input class="form-submit" id="formSubmit" name="submit" type='submit' value='SUBMIT' />
  
  {/exp:email:contact_form}

The only values that come through are:

  • email
  • subject -message

None of the radio button values show up.

Am I doing something wrong?

Thanks.

       
Robin Sowell's avatar
Robin Sowell
13,255 posts
about 2 years ago
Robin Sowell's avatar Robin Sowell

Can you paste your full tag/form? And the email gets there- right? Just not the inputs? Are you naming them all message[]?

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.