From f174a05d53d55c06225be7d45d2bfd89762222e8 Mon Sep 17 00:00:00 2001 From: saifsultanc Date: Thu, 4 Sep 2025 18:33:31 +0530 Subject: [PATCH] `gpps-live-refresh.php`: Fixed an issue with GPPS Live Refresh with Radio Button field. --- gp-preview-submission/gpps-live-refresh.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/gp-preview-submission/gpps-live-refresh.php b/gp-preview-submission/gpps-live-refresh.php index c3061d8b3..3e498a18d 100644 --- a/gp-preview-submission/gpps-live-refresh.php +++ b/gp-preview-submission/gpps-live-refresh.php @@ -88,7 +88,16 @@ public function output_script() { }; self.$form.find( 'input, select, textarea' ).each( function() { - data[ $( this ).attr( 'name' ) ] = $( this ).val(); + var $input = $( this ), + name = $input.attr( 'name' ); + + if ( $input.is(':radio') ) { + if ( $input.is(':checked') ) { + data[name] = $input.val(); + } + } else { + data[name] = $input.val(); + } } ); $.post( self.ajaxUrl, data, function( response ) {