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

Comments

shin.cho created an issue. See original summary.

shin.cho’s picture

jrockowitz’s picture

New community member and active community member requests will be prioritized.
Please consider getting involved, funding development, and hiring professional support.
jrockowitz’s picture

Status: Active » Needs review
StatusFileSize
new1.11 KB

  • jrockowitz authored 59708db on 8.x-5.x
    Issue #3214889 by jrockowitz, shin.cho: Sub-RadioButton-Element located...

  • jrockowitz authored 59708db on 6.x
    Issue #3214889 by jrockowitz, shin.cho: Sub-RadioButton-Element located...
jrockowitz’s picture

Status: Needs review » Fixed
Webform logo This ticket was completed using Open Collective funds.
Please consider joining the Webform module's Open Collective to help ensure that the Webform module is maintained.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.