Skip to content

Commit 8d7487c

Browse files
committed
gw-disable-submit-button-until-required-fields-are-filled-out.php: Fixed compatibility issue with image choice field.
1 parent 75ec40f commit 8d7487c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

gravity-forms/gw-disable-submit-button-until-required-fields-are-filled-out.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,12 @@ public function output_script() {
8888
$(document).on( 'gppa_updated_batch_fields', function() {
8989
self.runCheck();
9090
});
91+
// Check when field is image choice.
92+
gform.addAction( 'gform_input_change', function( elem, formId, fieldId ) {
93+
if ( args.inputHtmlIds.includes( `#input_${formId}_${fieldId}` ) && $( elem ).parents( '.gfield--type-image_choice' ) ) {
94+
self.runCheck();
95+
}
96+
});
9197
// GPPA logic may enable submit button, disable that logic.
9298
gform.addFilter( 'gppa_disable_form_navigation_toggling', function() {
9399
return true;

0 commit comments

Comments
 (0)