Skip to content

Commit 1a82b41

Browse files
authored
gw-conditional-logic-enable-current-field.php: Fixed an issue with conditional logic on current field snippet running on pages other than Form Editor.
1 parent 9e6142c commit 1a82b41

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gravity-forms/gw-conditional-logic-enable-current-field.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<script>
2424
gform.addFilter( 'gform_is_conditional_logic_field', function( isSupported, field ) {
2525
// Only apply our logic in the form editor when the current field is selected and its visibility is not set to "administrative".
26-
if ( GetSelectedField() && GetSelectedField().id == field.id && field.visibility !== 'administrative' ) {
26+
if ( typeof GetSelectedField === "function" && GetSelectedField() && GetSelectedField().id == field.id && field.visibility !== 'administrative' ) {
2727
var inputType = GetInputType( field );
2828
isSupported = jQuery.inArray( inputType, GetConditionalLogicFields() ) !== -1;
2929
}

0 commit comments

Comments
 (0)