Forum

Thread tagged as: Problem, Error, Forms

Perch input outputting blank select option incorrectly as bug

Got a weird bug, only happening on one of our Perch sites.

<perch:input type="select" id="Indoor-or-Outdoor" options="Indoor or Outdoor, Indoor, Outdoor" />

is outputting...

<select id="form3_Indoor-or-Outdoor" name="Indoor-or-Outdoor">
    <option selected="selected" value=""></option>
    <option value="Indoor or Outdoor">Indoor or Outdoor</option>
    <option value="Indoor">Indoor</option>
    <option value="Outdoor">Outdoor</option>
</select>

Any idea? Thanks.

James Hazelton

James Hazelton 0 points

  • 5 years ago

Same issue when using value and allowempty

<perch:input type="select" id="Indoor-or-Outdoor" options="Indoor or Outdoor, Indoor, Outdoor" value="Indoor or Outdoor" allowempty="false" />

is outputting...

<select id="form3_Indoor-or-Outdoor" name="Indoor-or-Outdoor">
    <option value=""></option>
    <option selected="selected" value="Indoor or Outdoor">Indoor or Outdoor</option>
    <option value="Indoor">Indoor</option>
    <option value="Outdoor">Outdoor</option>
</select>

*Post removed for privacy

Drew McLellan

Drew McLellan 2638 points
Perch Support

What's the difference between this site and where it's not happening?

Really don't know! I tried copying both forms and pages vice versa, still acting up only on this site.

Could I try downgrading Perch by replacing the core folder from another project, or anything else should try?

Can confirm Perch forms version is same on other sites 1.8.3. Tried re-install, still the same.

Drew McLellan

Drew McLellan 2638 points
Perch Support

We'll log it to look into.

Yep, appears to be a bug with at least 2.8.18.

Just downgraded to 2.8.4, instantly solved the issue, works as expected now. Now just need to pin point which version did the bug creep in?

Drew McLellan

Drew McLellan 2638 points
Perch Support

There's no need to do that - we've got it logged so we'll fix it.

Excellent, thanks.