Skip to content

Commit 1440cb6

Browse files
committed
gpld-populate-new-minimum-date-into-linked-date-field.js: Fixed an issue with default value of field notgetting used to apply minimum date.
1 parent d44d244 commit 1440cb6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

gp-limit-dates/gpld-populate-new-minimum-date-into-linked-date-field.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ document.addEventListener( 'gform/post_render', (event) => {
2323
gform.addAction(
2424
'gform_post_conditional_logic_field_action',
2525
(formId, action, targetId, defaultValues, isInit) => {
26+
// Only for fields and when we are not hiding them.
27+
if (action == 'hide' || targetId == '#gform_submit_button_' + formId) {
28+
return;
29+
}
30+
2631
const $field = getSourceField(formId, sourceFieldId);
2732
triggerFieldEventsIfValueExists($field);
2833
}

0 commit comments

Comments
 (0)