Forum

Thread tagged as: Question, Members

Can I use categories in a form?

I want to include a countries select in the members registration form. I have created a category set for country and listed countries there. However the template doesn't output anything. Is it possible to use the perch:categories tag within the members registration template?

The relevant part of my /members/forms/register.html template is:

<li class="field">
        <perch:label for="country">Country</perch:label>
        <select name="country" style="width:260px;">
   <perch:categories id="country" label="Country" set="country"><option value="<perch:category id="catTitle"/>"><perch:category id="catTitle"/></option>
   </perch:categories></select>
    </li>
R T Partridge

R T Partridge 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Not directly, no. Instead you'll need to get the categories in your page and pass the result into the template.