Drupal 8 webform approach for multiple forms

Hi All,

Recently I have problems with webforms.

I want to create webforms that users external to the cern can fill in and that will then be validated with the same fields by the cern security experts.

First I thought about making 2 webforms, the first one for external users and the second one for internal users (authenticated and with access rights). The second form would take the fields from the first one (by copy, automatic filling or clone?) and add additional fields.

But it seems rather complicated to me as an approach, I’m not sure if I can come up with something usable…

Then I thought about making a single webform, with public fields and hidden fields for authenticated users.

How would you approach this problem ?

More precise personal explanation :

We currently have a site under Drupal 7 https://ep-th-safety.web.cern.ch/isiec where external users must submit an ISIEC webform for the experiments they want to come and do at Cern. The security experts then validate the zones and submit a safety clearance in the form of a webform. They are lots of same fields but the two are independent.

For the new site I would like to make sure that both are linked. No need to retype everything by hand.

Your help would be greatly appreciated.
Many thanks!

Hi Maxime,

If I understand you correctly you want to have one Webform which has specific fields which should be displayed based on the user’s role (authenticated / not authenticated in your case).
Also you want to use Drupal 8, right?

For Drupal 8 we provide the Webforms module directly in the infra, so it should already be listed within your website. If you got to ‘Extend’ under the ‘Webform’ tab you can find the base module and some useful extensions for the module ready to be installed.

With this module you can do exactly what you want. You can give permission rights based on the whole form or rather on specific fields, whatever you prefer. Also you can build your basic webform for anonymous users, use it as template and later re-use it for your webform for the authenticated users. So you can actually choose your approach. :slight_smile:

If you have any further question please let me know :slight_smile:

Patrick

Edit: Also if you’re worried about the styling for now, we will provide a common Webform styling with the next version of the CERNBASE theme, which should be deployed soon. :slight_smile: