Skip to content

Commit

Permalink
gpld-conditional-limits.php: Fixed issue where GP Limit Dates' fron…
Browse files Browse the repository at this point in the history
…tend assets were not being enqueued when using snippet.
  • Loading branch information
malayladu authored Jan 23, 2025
1 parent 281b694 commit b2580db
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gp-limit-dates/gpld-conditional-limits.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ public function init() {
add_filter( 'gform_register_init_scripts', array( $this, 'add_init_script' ), 10, 2 );
add_filter( 'gform_enqueue_scripts', array( $this, 'enqueue_form_scripts' ) );
add_action( 'gform_field_validation', array( $this, 'validate' ), 11, 4 );

// Enables date limits for the form field, allowing the `gp-limit-dates` script to be enqueued.

Check failure on line 33 in gp-limit-dates/gpld-conditional-limits.php

View workflow job for this annotation

GitHub Actions / PHPCS

Tabs must be used to indent lines; spaces are not allowed
add_filter( "gpld_has_limit_dates_enabled_{$this->_args['form_id']}_{$this->_args['field_id']}", '__return_true', 10, 2 );
}

public function enqueue_form_scripts( $form ) {
Expand Down

0 comments on commit b2580db

Please sign in to comment.