Skip to content

Commit 97bd5c1

Browse files
committed
Update radio group selection in form validation
1 parent 47f221d commit 97bd5c1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/js/_enqueues/admin/common.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2382,9 +2382,9 @@ $( function( $ ) {
23822382

23832383
// Check all radio groups for validity.
23842384
let allValid = true;
2385-
const radioGroups = usersForm.querySelectorAll( 'fieldset' );
2386-
radioGroups.forEach( function( fieldset ) {
2387-
const radios = fieldset.querySelectorAll( 'input[type="radio"]' );
2385+
const radioGroups = usersForm.querySelectorAll( 'fieldset ul' );
2386+
radioGroups.forEach( function( radioGroup ) {
2387+
const radios = radioGroup.querySelectorAll( 'input[type="radio"]' );
23882388
let checkedRadio = null;
23892389
radios.forEach( function( radio ) {
23902390
if ( radio.checked ) {
@@ -2393,7 +2393,7 @@ $( function( $ ) {
23932393
});
23942394

23952395
if ( checkedRadio && checkedRadio.value === 'reassign' ) {
2396-
const select = fieldset.querySelector( 'select' );
2396+
const select = radioGroup.querySelector( 'select' );
23972397
if ( select && select.value === '-1' ) {
23982398
allValid = false;
23992399
}

0 commit comments

Comments
 (0)