Skip to content

Commit 1049e8e

Browse files
authored
gw-validate-that-a-value-exists.php: Fixed an issue with script not working with value validation snippet.
1 parent 65044dc commit 1049e8e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

gravity-forms/gw-validate-that-a-value-exists.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,8 @@ public function load_form_script( $form, $is_ajax_enabled ) {
176176

177177
// Do not output main script if AJAX is enabled
178178
if ( ! $is_ajax_enabled && $this->is_applicable_form( $form ) && ! self::$is_script_output && ! $this->is_ajax_submission( $form['id'], $is_ajax_enabled ) ) {
179-
$this->output_script();
179+
add_action( 'wp_footer', array( $this, 'output_script' ) );
180+
add_action( 'gform_preview_footer', array( $this, 'output_script' ) );
180181
}
181182

182183
return $form;

0 commit comments

Comments
 (0)