I have a form which is very extensive since there are many fields to fill out and they are mandatory. I show them all in a modal but there are other data to fill and these are optional and I don't want to show them unless the user or administrator wants to see it. I wanted to know if there is a method for that, to hit next or check a box, press a button, whatever, so that it displays the rest of the form to fill out and at the end saves the data
You can hide optional forms with css and show them with js when a checkbox is checked.
Example:
edited code