Per my other post figuring out how to hide a field and reveal based on selection of another field I appreciate the explanation. There is an issue with having that field being set at "Required" and not able to submit the form if the option is not selected for that hidden field.
I have a form where users have a selection of products to choose in one field such as (T-shirt, Jacket, Speaker, etc.) and then I have hidden required fields related to those products and are revealed based on their selection for example if some selects T-shirt then the hidden field for T-shirt Size would appear so they could select their size while the other hidden required fields for the other products lets say Speaker Color and Jacket Size would remain hidden. I need these hidden fields to be set to required because they are necessary information depending on what is selected.
On CF7 I was able to run an event where I would do "Show, Enable Field(s), Enable Field(s) Validation" If any match "Field 1" equals "Item A". Then another event "Hide, Disable Field(s), Disable Field(s) Validation, Clear Field(s)" if any match "Field 1" Not equals "Item A".
How do you do that on CF8?
Appreciate your help!
I have a form where users have a selection of products to choose in one field such as (T-shirt, Jacket, Speaker, etc.) and then I have hidden required fields related to those products and are revealed based on their selection for example if some selects T-shirt then the hidden field for T-shirt Size would appear so they could select their size while the other hidden required fields for the other products lets say Speaker Color and Jacket Size would remain hidden. I need these hidden fields to be set to required because they are necessary information depending on what is selected.
On CF7 I was able to run an event where I would do "Show, Enable Field(s), Enable Field(s) Validation" If any match "Field 1" equals "Item A". Then another event "Hide, Disable Field(s), Disable Field(s) Validation, Clear Field(s)" if any match "Field 1" Not equals "Item A".
How do you do that on CF8?
Appreciate your help!
On v8.0.16 you can do the same thing
on any field you can have a Trigger:
On=Value IN
Values=Item A
Trigger=show_some_fields
Then in each of your "fields" (or in a container for your fields) you can add a listener to the "show_some_fields" trigger which will "Show, Enable Field(s), Enable Field(s) Validation"
And do the same for "Hide, Disable Field(s), Disable Field(s) Validation, Clear Field(s)"
on any field you can have a Trigger:
On=Value IN
Values=Item A
Trigger=show_some_fields
Then in each of your "fields" (or in a container for your fields) you can add a listener to the "show_some_fields" trigger which will "Show, Enable Field(s), Enable Field(s) Validation"
And do the same for "Hide, Disable Field(s), Disable Field(s) Validation, Clear Field(s)"
On v8.0.16 this does not work. I would attach screenshots but I do not know how to. Below are my settings for each field. Also, there was no "Clear Field(s)" under actions.
Field One Product Selection
Event Trigger
On: Value IN
Value: Product A
Trigger: show_product_a
Event Trigger
On: Value is Not IN
Value: Product A
Trigger: hide_product_a
Required
Field Two Size Selection
Event Listener
On Trigger of: show_product_a
Action to do: Show, Enable Validation, Enable
On Trigger of: hide_product_a
Action to do: Hide, Disable Validation, Disable
Field Class
hidden
Required
Field One Product Selection
Event Trigger
On: Value IN
Value: Product A
Trigger: show_product_a
Event Trigger
On: Value is Not IN
Value: Product A
Trigger: hide_product_a
Required
Field Two Size Selection
Event Listener
On Trigger of: show_product_a
Action to do: Show, Enable Validation, Enable
On Trigger of: hide_product_a
Action to do: Hide, Disable Validation, Disable
Field Class
hidden
Required
Apparently checkboxes cause problems with event triggers... Dropdown box works. I also noticed that it only works on the first page. I think Max has solved this and it will work with the next update.
Thanks for the info! I am using it on the second page of the form with dropdown boxes and it doesn't work. Hopefully, all resolved in the next update!
@remline, what is the type of "Field One" and "Field Two" ?
You need to login to be able to post a reply.