Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 504799

Multiple type select field conditional logic

$
0
0

Replies: 1

I am using conditional logic in the submit button to show it based on the condition of a select field above it.

The select field named ‘Product’ is of the single type. The first option has a label of Select but no value (so it will treated as an empty option).

In the conditional logic of the submit button I put Show if Product field Is not Select. Forminator doesn’t let it stick on ‘Select’ option and instead it defaults to an option called ‘Select option’, I am assuming because ‘Select’ is an empty option anyway. But it works as I want i.e. the submit button is hidden until any of the real options (with a value) are selected in the Product select field.

All things being equal, if I try the same again however this time the select field is the multiple type (where the select becomes an opened out box and multiple options can be chosen by the front user). With this field I didn’t add a first empty option with a label of Select, like the single select field had, because it’s not necessary and I only want to present the actual options.

So in the conditional logic of the submit button I put Show if Product field Is not Select option, i.e. the default option ‘Select option’ is still there. (in both the single and multiple select fields Forminator defines the result as ‘Product is not null’).

But the way it works now is that the submit button is always visible, rather than hidden until a non null option is selected.

I think it’s got something to do with the single select list is actually selected on the first option automatically. So I added a first option for the multiple select field with a label of Select but no value just like I did with the single field, and tried this with the option both checked on ‘Selected’ and not selected. The result is the same, so can I confirm that a multiple type select field can’t let the submit button (or other fields) use conditional logic based on it.

Using this is handy because in the single select, the submit can be hidden until any of the many real options are chosen by the user with one conditional logic rule. In my form I’d ideally like to use both though (single and multiple fields).

Thank you.


Viewing all articles
Browse latest Browse all 504799

Trending Articles