Problem/Motivation
Sub-RadioButton-Element located in container(hidden/visible by condition) does not support clientside required validation
※By the way,this bug will not happend when parent container is always visible
Steps to reproduce
1)Import attachment[webform.webform.sub_element_require_test_radiobu.yml] into drupal site.
2) Access the webform page that you imported in step1
3) Click submit button,request could not be submitted due to clientside required validation of [RadioButton]
4) Make [RadioButton] check on
5) Click submit button,request will be submitted without clientside required validation of [Sub-RadioButton]
Proposed resolution
If you have done blew step Before Step 5, the clientside required validation of [Sub-RadioButton] will be run.
4-1) Make [Trigger] check out
4-2) Make [Trigger] check on
The reason for this phenomenon is that when [Trigger] is be checked on, the [Sub-RadioButton] is added with the correct required tag by JS.
So,I think we need to make sure that when PHP does the page init rendering, the HTML of the [Sub-RadioButton] is rendered correctly.
Remaining tasks
Write patch
Review patch
Commit patch
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 3214889-4.patch | 1.11 KB | jrockowitz |
| webform.webform.sub_element_require_test_radiobu.yml | 5.19 KB | shin.cho |
Comments
Comment #2
shin.cho commentedComment #3
jrockowitz commentedComment #4
jrockowitz commentedComment #7
jrockowitz commentedPlease consider joining the Webform module's Open Collective to help ensure that the Webform module is maintained.