- Issue created by @sassafrass
- First commit to issue fork.
- 🇮🇳India kasli_harshit
Hi @sassafrass i tried to reproduce the issue with specified Webform version and D10, i can reproduce the same issue after checking the checkbox the radio button is not showing as required , but if we try to submit the form without selecting the value if the radio-box, we will get an error that please select a value .
Therefore i think the radio field is still required and working fine from backend logic. it is just not showing the required symbol(*) over the radio button , so it's more related of css / js issue and we can update the Title and description accordingly.
Moreover you can confirm the same over it.Adding the screenshot for the reference.
- 🇮🇳India viren18febS
HI @sassafrass
We get an warning message on webform, when we try to apply the visibility condition on radio field (as per issue description).
which is related to removing the required state from current form element.
If we hide the element based on conditions, then it will be change from required to optional for prevent the form submission error.
Attached screenshot of warning.
I have added a patch for above issue but not generated the MR, you can use the patch as per your need.
- Status changed to Needs review
about 1 year ago 1:32pm 25 October 2023 - last update
about 1 year ago 534 pass, 4 fail The last submitted patch, 4: conditionally-hidden-fields-inconsistently-required-fixes-3395689.patch, failed testing. View results →
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.- Status changed to Needs work
about 1 year ago 3:15pm 25 October 2023 - 🇺🇸United States sassafrass
I agree that this is functioning as expected and it's just the asterisk that is not displaying. I've changed the issue title to reflect that. The asterisk does display as expected for field types other than radio buttons so I think it's specific to that field type. That being said, this patch un-does important functionality in that it removes the required functionality from hidden fields that are required, if they remain hidden (not used) when the form is submitted. I don't think we want to remove that functionality. We just want the asterisk to display on the radio buttons like it does for the other fields.
- @drumm opened merge request.
- 🇮🇳India mukhtarm
The required class needed to be added to the
fieldset-legend > span > label
, Then only it displaying the asterisk. It's not displaying it when added to thefieldset-legend
. Not sure about the previous follow ups on this, but the patch works well for me in local. Any other work around or more performatic way is welcome. Thanks. - Status changed to Needs review
about 1 year ago 8:00am 27 October 2023 - last update
about 1 year ago 536 pass - 🇮🇳India kasli_harshit
I have applied the patch #11 , working as expected now the required(*) symbol in showing on the radio field . Attaching the screenshot for the same we can move this to RTBC+1, Thanks.
- 🇺🇸United States sassafrass
I have applied the patch #11 , working as expected now the required(*) symbol in showing on the radio field . Thanks!
- Status changed to RTBC
about 1 year ago 7:33pm 30 October 2023 - last update
about 1 year ago Patch Failed to Apply - last update
about 1 year ago 536 pass - last update
about 1 year ago 536 pass - last update
about 1 year ago Patch Failed to Apply - last update
about 1 year ago Patch Failed to Apply -
Liam Morland →
committed aa169ba5 on 6.2.x authored by
MukhtarM →
Issue #3395689 by viren18febS, MukhtarM, kasliwal_harshit, sassafrass,...
-
Liam Morland →
committed aa169ba5 on 6.2.x authored by
MukhtarM →
- Status changed to Fixed
about 1 year ago 2:52pm 10 November 2023 Automatically closed - issue fixed for 2 weeks with no activity.