Bugfix for broken signaturepads
-
According to the github page
https://github.com/Breizhtorm/Contact-Form-7-Signature-Addon
“Important note : Plugin scripts are loaded in the footer, so your theme MUST be using the wp_footer() template tag for the signature field to work properly.”
that said, the plugin specifically tells WordPress to load the scripts in the head. To fix, edit:
/public/class-wpcf7-signature-public.php
find the entries on line 72/73:
wp_enqueue_script( $this->plugin_name.’-signature’, plugin_dir_url( __FILE__ ) . ‘js/signature_pad.min.js’, array(), $this->version, false );
wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . ‘js/scripts.js’, array( ‘jquery’, $this->plugin_name.’-signature’ ), $this->version, false );and change ‘false’ to ‘true’ in the last attribute
wp_enqueue_script( $this->plugin_name.’-signature’, plugin_dir_url( __FILE__ ) . ‘js/signature_pad.min.js’, array(), $this->version, true );
wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . ‘js/scripts.js’, array( ‘jquery’, $this->plugin_name.’-signature’ ), $this->version, true );done, wordpress now loads the scripts in the footer. plugin fixed.
- The topic ‘Bugfix for broken signaturepads’ is closed to new replies.