Forum

Thread tagged as: Problem, Forms

Outputting a radio in email template for forms

I have made a form with a radio field. The form has about 10 fields. All works fine: The submitted information is saved correctly in Perch admin. The response email(s) are outputting the correct information when using the 'email template: plain text only'.

Then I made an email template. All fields had the correct output except for 1 field: a radio field. I have tried making a debug for it, but didn't succeed.

Form template snippet

<div class="gender"> 
  <perch:label class="mainlabel" for="gender">Male/Female</perch:label>
  <perch:input type="radio" name="gender" options="Male,Female" />
</div>

Email template snippet, the 'gender' field is at the end of the line.

<tr>
  <th>Name</th>
  <td><perch:email id="firstname" /> <perch:email id="lastname" /> <perch:email id="gender" /></td>
</tr>  

I hope this is sufficient information for you to analyse.

So the problem is, the gender field will not output to the email (template). Can you help?

thx

René Banus

René Banus 0 points

  • 6 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

Your input field does not have an id.

An id is required: https://docs.grabaperch.com/docs/form/template-tags/input/

This solved it. Thank you!