🐛 | Webform | Webform EmailConfirm - clientside validation - not working when EmailConfirm is inside a webform container element/section element or visibility controlled via a condition field
🇬🇧United Kingdom mashraf Berkshire
Managed to get it to work by adding required
class to the element which is inside the container.
Full webform source:
name:
'#type': name
'#title': Name
'#title__required': true
'#first__required': true
'#middle__access': false
'#last__required': true
'#suffix__access': false
'#degree__access': false
address:
'#type': address
'#title': Address
'#address__required': true
'#city__required': true
'#state_province__access': false
confirm_email_outside_container_:
'#type': email_confirm
'#title': 'Confirm Email (Outside Container)'
'#required': true
'#required_error': 'Confirm Email (Outside Container) is required'
'#confirm__title': 'Confirm Email (Outside Container)'
what_language_badge_would_you_like_:
'#type': radios
'#title': 'What language badge would you like?'
'#options':
English: English
Cymraeg: Cymraeg
'#required': true
'#required_error': 'This is a required field'
container:
'#type': container
'#states':
visible:
':input[name="what_language_badge_would_you_like_"]':
value: Cymraeg
email:
'#type': email_confirm
'#title': 'Email (inside container)'
'#required': true
'#required_error': 'Email address is required'
'#attributes':
class:
- required
'#confirm__title': 'Confirm your email (inside container)'
I will review the fix and see best options to add this to the module.
🐛 | Webform | Webform EmailConfirm - clientside validation - not working when EmailConfirm is inside a webform container element/section element or visibility controlled via a condition field
🇬🇧United Kingdom mashraf Berkshire
🐛 | Webform | Webform EmailConfirm - clientside validation - not working when EmailConfirm is inside a webform container element/section element or visibility controlled via a condition field
🇬🇧United Kingdom mashraf Berkshire
🇬🇧United Kingdom mashraf Berkshire
Many thanks!
🇬🇧United Kingdom mashraf Berkshire
kashaf_ashraf → created an issue.