[Pro] Making Menu/list in a form

In a form using the Menu/List function, Is there a way of requiring a selection to be made? For example, if I put “Please select” as the initially selected item, can I trigger an error if that is left as the choice?

Using Pro 7.

Colin


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Unfortunately, Freeway (even 7 – i have filed bugs against this for every version since I first noticed it, long ago) still doesn’t make a proper “no value” select option when you leave the value field empty. What you get is this:

<select name="picker" size="1">
  <option>Please choose...</option>
  <option value="1">One</option>
  ...
</select>

And when you submit that with the first option chosen, you get this:

'picker' => 'Please choose...'

instead of what you might reasonably expect:

'picker' => ''

To fix this first problem, you need to add this Action to your page: http://actionsforge.com/actions/formfix

There are three things on the list that it does, the only one that is still a problem is #2 (Freeway still gets this wrong) and the other two are happily fixed. I guess I can clean up the Action to only do #2, then. (It won’t harm anything if you use it, it only adds the ID and type=text if the field doesn’t have those properties already.)

Now once you do this, you can probably get the form validation to pick up the fact that the field has no value when it is submitted.

Walter

On Feb 25, 2015, at 5:40 AM, Colin Lamont email@hidden wrote:

In a form using the Menu/List function, Is there a way of requiring a selection to be made? For example, if I put “Please select” as the initially selected item, can I trigger an error if that is left as the choice?

Using Pro 7.

Colin


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options