Skip to content

Commit

Permalink
gw-populate-date.php: Fixed an issue with Radio Button used as Modi…
Browse files Browse the repository at this point in the history
…fier with Populate Date Snippet.
  • Loading branch information
saifsultanc authored Jan 22, 2025
1 parent 37cc078 commit 9db39a3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gravity-forms/gw-populate-date.php
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,11 @@ public static function output_script() {
var $input = self.getInputs( inputId ),
value = self.getCleanNumber( $input.val(), gformExtractFieldId( inputId ), self.formId );

// Cannot retrieve value from `gfield_radio` directly on `$input`.
if ( ! $input.val() && $input.hasClass( 'gfield_radio' ) ) {
value = $input.find('input[type="radio"]:checked').val();
}

value = gform.applyFilters( 'gwpd_get_field_value', value, $input, inputId );

if ( ! value || isNaN( value ) ) {
Expand Down

0 comments on commit 9db39a3

Please sign in to comment.