Skip to content

Commit 2999ced

Browse files
authored
gpps-live-refresh.php: Fixed an issue with GPPS Live Refresh with Radio Button field.
1 parent ca433bf commit 2999ced

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

gp-preview-submission/gpps-live-refresh.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,16 @@ public function output_script() {
8888
};
8989

9090
self.$form.find( 'input, select, textarea' ).each( function() {
91-
data[ $( this ).attr( 'name' ) ] = $( this ).val();
91+
var $input = $( this ),
92+
name = $input.attr( 'name' );
93+
94+
if ( $input.is(':radio') ) {
95+
if ( $input.is(':checked') ) {
96+
data[name] = $input.val();
97+
}
98+
} else {
99+
data[name] = $input.val();
100+
}
92101
} );
93102

94103
$.post( self.ajaxUrl, data, function( response ) {

0 commit comments

Comments
 (0)