1

I have created form using Drupal 8 Webform.I have created fieldset and fields.But i couldn't add or alter fields inside fieldset using hook_form_alter.I can add fields outside of fieldset using form alter.How can i alter fields inside fieldset?

1 Answer 1

0

Finally i got the answer. In order to alter Drupal 8 webform we can use code like this

$form['elements']['field_name']['#title'] = t('Your Name');

I think same method can follow to alter other field attribute.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.