Forum

Thread tagged as: Problem, Members

Escaping comma in select options

In members.html I've added a dropdown to select annual turnover and I've used \ to escape the commas in the amounts. This works as expected in the frontend version of the registration form but when editing a member in the admin the following results.

<perch:members type="select" id="turnover" label="Annual turnover" options="Less than £49\,999 per year,£50\,000 - £99\,999 per year,£100\,000 - £249\,999 per year, £250\,000 - £499\,999 per year,£500\,000 - £999\,999 per year, £1\,000\,000 or more per year" listing="false" order="33"/>

Results in

<select id="perch_turnover" name="perch_turnover" class="">
  <option value="Less than £49\">Less than £49\</option>
  <option value="999 per year">999 per year</option>
  <option value="£50\">£50\</option>
  <option value="000 - £99\">000 - £99\</option>
  <option value="999 per year">999 per year</option>
  <option value="£100\">£100\</option>
  <option value="000 - £249\">000 - £249\</option>
  <option value="999 per year">999 per year</option>
  <option value="£250\">£250\</option>
  <option value="000 - £499\">000 - £499\</option>
  <option value="999 per year">999 per year</option>
  <option value="£500\">£500\</option>
  <option value="000 - £999\">000 - £999\</option>
  <option value="999 per year">999 per year</option>
  <option value="£1\">£1\</option>
  <option value="000\">000\</option>
  <option value="000 or more per year">000 or more per year</option>
</select>

Also having the same problem with select control as with radio buttons, in making the selections in the front-end registration form reflect the choice made in the admin member editing page.

Nick Loat

Nick Loat 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

This is currently a limitation. Only basic text fields really survive editing from both ends.

Drat. I'll have to see if I can work around this some how.

Wil this be addressed in a future update?

Is the comma escaping problem mentioned above in the select element when used as perch:member type="select" a bug? should I use the , (seems to work)?

Drew McLellan

Drew McLellan 2638 points
Perch Support

It's not a bug so much as an incompatibility between the way that public forms and field types work.