I have webform 7.x-3.18+3-dev and webform presav e 7.x.1.1 installed

how can I make one field be obligatory depending on another field.

Eg if someone selects phone as best form of contact they must fill out the phone field. If they choose email they must fill out the email field.


Take a look at https://www.drupal.org/project/webform_conditional

Just make both e-mail & phone mandatory, but only show the relevant field, based on what was chosen in 'best form of contact'.

The module takes into account the 'state' of the form. It doesn't force mandatory, even if the field is set to be mandatory, but is hidden due to a certain select option ( in your case, the 'best form of contact' ).


i think field permissions module will help you


I had to make a custom module to do it without hiding the fields . Followed the instructions here https://www.drupal.org/node/908600

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy