Forum

Thread tagged as: Question, Forms

Select input in form not behaving as expected

I'm trying to set up a simple select input in a form but it's not working.

In my template I have the following:

<perch:input type="select" label="Select a preserve" id="preserve" options="Whaleboat,East Goslings,West Goslings" />

When I view the page containing the form I see the following in source:

<select id="form1_preserve" name="preserve"><option selected="selected" value=""></option></select>
    <option>Select a preserve</option>
    <option value="Whaleboat">Whaleboat</option>
    <option value="East Goslings">East Goslings</option>
    <option value="West Goslings">West Goslings</option>
</select>

It seems to be generating some seriously messed up html. Can anyone point out what I'm doing wrong?

Thanks, Tim

Timothy Swan

Timothy Swan 0 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

That looks very wrong, doesn't it.

Can you show us that full template? Are you running 2.7.10?

Two minutes after posting I deleted the region on the page and refreshed, linked to the template again and all worked as expected. Not sure what happened to cause it. Thanks for the speedy response, as always Perch is great and so is the support.