[Pro] Menu/List validate

I have a select Menu/List in a form with 3 options:

List name: Membership
Opt 1 : Full
Opt 2 : Associate
Opt 3 : Non-member

When I preview the page it has option 1 selected by default.

  1. I would prefer it if it said ‘please choose’. Is that possible?

  2. Also, I have applied the Validate action to it but don’t understand how this can validate it as an option is selected by default.

Can anyone help with this?

Thanks.


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

Add the Please Choose option to your list and set it as the default.

David


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

There is a subtle bug/feature in Freeway that makes this difficult. You can set the Please choose option as your default, but if you don’t put anything in the value field, many/most browsers will interpret the resulting option:

<option>Please choose...</option>

as equalling

<option value="Please choose...">Please choose...</option>

and that means that the picker will not evaluate as empty, it will equal “something”.

What you need is to have the option come out as

<option value="">Please choose...</option>

and Freeway doesn’t do that – it collapses any empty attribute to nothing at all. I wrote an Action a number of years ago to solve this problem, it’s called SelectFix. You can apply it to the field or to the page (and it will fix all your select elements at once). Select Fix - ActionsForge

Walter

On Feb 13, 2012, at 7:25 PM, DeltaDave wrote:

Add the Please Choose option to your list and set it as the default.

David


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

Thanks to you both.

I am using the Validate action on the list but if the selection is left as ‘Please choose’ validate doesn’t warn the user.

What is the correct way to use this Action for a list?


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

I haven’t tried this specific combination, but try applying SelectFix to the select list along with Validate. Set the first option to have the label ‘Please choose…’ but the value set to nothing. All the other options in the list, set their label and value to the same, so your result code looks like this (once SelectFix has “fixed” it):

<select name="pet" size="1">
	<option value="">Please choose...</option>
	<option value="Aardvark">Aardvark</option>
	<option value="Baboon">Baboon</option>
	<option value="Chihuahua">Chihuahua</option>
	<option value="Donkey">Donkey</option>
</select>

Now also apply the Validate Action to that field. As long as the two get along with one another (and that’s the only part of this I haven’t tested) the form should attempt to submit a field that equals nothing (empty string) rather than Please choose… and thus the Validate Action should throw a hissy fit as it’s supposed to.

Walter

On Feb 14, 2012, at 5:04 AM, Sly wrote:

Thanks to you both.

I am using the Validate action on the list but if the selection is left as ‘Please choose’ validate doesn’t warn the user.

What is the correct way to use this Action for a list?


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

Hi Walter,
This is what I tried and it appears to work perfectly (I used the FormFix rather than the SelectFix Action);

  1. Download and install Walter’s FormFix Action - FormFix - ActionsForge
  2. Apply the Action to your form page
  3. Make sure that the default selection of your menu/list is;
    Choice: Please choose…
    Value:
    (no value)
  4. Apply the Validate Action to the menu/list item
  5. in the Actions palette make sure the default value setting is empty (cleared)

Now when you try and submit the form you should see an alert that tells you the menu has no value.
For bonus points you can choose to add any value you like in steps 3 and 5 and as long as they match you should be fine.
Regards,
Tim.

On 14 Feb 2012, at 15:45, Walter Lee Davis wrote:

Now also apply the Validate Action to that field. As long as the two get along with one another (and that’s the only part of this I haven’t tested) the form should attempt to submit a field that equals nothing (empty string) rather than Please choose… and thus the Validate Action should throw a hissy fit as it’s supposed to.


FreewayActions.com - Freeware and commercial Actions for Freeway Express & Pro - http://www.freewayactions.com
FreewayStyle.com - Free Freeway templates and parts to download, use and explore - http://www.freewaystyle.com


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

I can verify that Tim’s fix works, thank you, bonus points included!

Thanks very much all.


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

Can anyone help with this now that I have version 6? Do not think Walt’s Form Fix will help and I have a drop down menu that I do not want my visitor to be able to skip over.

THanks,

Barry


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

Form Fix does not have any means of making a field mandatory – all it does is fix the layout of a form element in Freeway 5.6 or lower (6 includes the same CSS that this Action writes in the application core – it’s not needed in 6 at all.

There is a form validation suite Action in the Forge – give that a try for making form elements mandatory. Normally, a picking list will not need this treatment, because there’s always one value chosen or another. The only exception is if you have a blank value (Please choose…) as your first option. Unfortunately, there’s a bug in Freeway which prevents you from making a form element that has a blank value. Even if you leave the value field blank, the form will submit with the value in the Name field. (I’ll file a bug on this.)

Walter

On Nov 9, 2013, at 7:34 PM, Hoffkids wrote:

Can anyone help with this now that I have version 6? Do not think Walt’s Form Fix will help and I have a drop down menu that I do not want my visitor to be able to skip over.

THanks,

Barry


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

Walt,

I believe I am using the validation suite.
my list looks like this

-choose one…
-video title 1
-video title 2
-video title 3

So are you saying that as of now there is no way to have an error message appear if they forget to choose one for a drop down list?

Even if I get rid of the “choose one” it does not seem to matter.

Barry


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

Even if I get rid of the “choose one” it does not seem to matter.

Instead of making it a Drop down if you increase the height of the selector field the validate will work if they dont select an option.

D


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

Walt, I just noticed from your message that i did NOT apply the validate extras action to the page. Maybe this will help


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

Dave,

Can you explain a little more- I saw I can by pass this by them seeing all the choices at once- is this what you mean?

You lost me a little bit. If it is not a drop down list- what is it?


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

sorry forgot to show…

http://www.hoffkids.com/videofeedback.html


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

Sorry, I was remembering the wrong Action here. Yes, this Action should make it possible to set up a form element with an empty value and have it perform correctly. However, I have never tested this Action in conjunction with the form validation suite. Please give it a try and let me know how it goes. It’s not listed as being compatible with FW6, but I can’t think of any good reason why it wouldn’t work.

(Just tried it out – works perfectly on an HTML5 page in Freeway 6.)

Walter

On Nov 9, 2013, at 8:53 PM, Walter Lee Davis wrote:

Form Fix does not have any means of making a field mandatory – all it does is fix the layout of a form element in Freeway 5.6 or lower (6 includes the same CSS that this Action writes in the application core – it’s not needed in 6 at all.


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

I did try Form Fix 2.2 and something interesting happened.
It did present a pop up message when nothing was chosen (I thought I had it!!!).

Then I tried again and when I did choose something that message still showed up that nothing was chosen- it was like the opposite effect.

here try it out.

http://www.hoffkids.com/videofeedback.html

Also form fix 2.2 with v6 did not show anyting in action pallette. just blank.


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

Perfectly normal, there is nothing to set or configure.

Walter

On Nov 9, 2013, at 9:27 PM, Hoffkids wrote:

Also form fix 2.2 with v6 did not show anyting in action pallette. just blank.


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

figured that- just getting a reverse effect. With applied on page… doesn’t like my picking anything…


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

Please make a new blank page with nothing on it besides one picker and the submit button. Apply FormFix to the page and validation suite to the picker. You have a lot of other JavaScript on this page, and I am not able to figure out why it isn’t working. I do see that it is having trouble figuring out the form input.

Walter

On Nov 9, 2013, at 9:27 PM, Hoffkids wrote:

Then I tried again and when I did choose something that message still showed up that nothing was chosen- it was like the opposite effect.


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

ok- will do that now- good idea…


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