Drupal 8 - Module: Webform ( https://www.drupal.org/project/webform )
I have a web form design that starts with three buttons at the top. Depending on which one is clicked, the form changes. One page is common to all three and all three have an extra page which is specific to itself only.
The pages which are specific to a button has elements which are "required".
I initially built the web form as three separate web forms and the buttons at the top simply redirected to the correct web form. The problem here is that the common page ("About you") had to be recreated 3 times and also resulted in the submissions been split across three separate sections.
In the current Drupal 8 version of Webform, hardly any of the libraries that extend it are not available for Drupal 8.
What would be the best way to integrate this web form into a single form. Hiding/showing sections can be done easily enough using simple CSS and/or jQuery but the issue is that if a section of the form which is hidden has a required form element, on submission the form validates falsely.
Is there are a way to conditionally turn off the required status of an element based upon the buttons selected at the top?