I’m trying to create a multi-step form using a slider and have groups of checkboxes.
I want to require the user to select at least one checkbox in the group. If they don’t select at least one before they click “next” then I want to show an error message.
Also curious about this. I have a client with several large forms with a multitude of checkbox groups. Right now I’m using a script but it’s not the ideal solution and needs to be updated any time a new group of checkboxes is added, so not easy for the client to implement or maintain.
there is the required field option
but in the example your button does not have anything to do with continuing the form so it will not have any effect
the button merely moves forward the slider.
In order for it to catch the error it has to be tied to the form itself.
The form would be divided into pages or you could probably trigger divs someway on click.
Basically the button has to be the submit button from the form. If something is marked as required it will bring up an error message if it is not filled in or selected.
The action that happens on success can either be taken to another page of the form deeper or possibly hooked to an interaction to bring up another div.
I like the idea though would be interesting to try on a future form.