Title: Validation Required Issues
Last modified: January 14, 2021

---

# Validation Required Issues

 *  [scottzozer](https://wordpress.org/support/users/scottzozer/)
 * (@scottzozer)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/validation-required-issues/)
 * I am having an issue on using the Signature Addon. When I submit my form I get
   a validation error for the required signature and then if I just hit submit again
   it submits fine.

Viewing 11 replies - 1 through 11 (of 11 total)

 *  Thread Starter [scottzozer](https://wordpress.org/support/users/scottzozer/)
 * (@scottzozer)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/validation-required-issues/#post-13909208)
 * It looks like the signature base64 isnt added to the hidden field until after
   I hit submit the first time. Is there a control button I am missing that allows
   a user to save their signature or similar? right now it only shows a `clear` 
   button.
 * I have also removed all other CF7 plugins. Is there a known list of plugins that
   do not play well with your plugin?
    -  This reply was modified 5 years, 4 months ago by [scottzozer](https://wordpress.org/support/users/scottzozer/).
 *  Thread Starter [scottzozer](https://wordpress.org/support/users/scottzozer/)
 * (@scottzozer)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/validation-required-issues/#post-13909441)
 * I am thinking its a timing thing. It seems that the form checks validation quicker
   than your plugin moves the signature into the hidden field thus failing the validation
   of required field.
 *  Thread Starter [scottzozer](https://wordpress.org/support/users/scottzozer/)
 * (@scottzozer)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/validation-required-issues/#post-13909809)
 * Currently what I am doing to work around this issue is the following
 *     ```
       var doublecheckblocker = 0;
           document.addEventListener( 'wpcf7invalid', function( event ) {
               var inputs = event.detail.inputs;
               var validation_errors = [];
               if(inputs.length > 0) {
                   for (var i = 0; i < inputs.length; i++) {
   
                       if ('participant-signature' != inputs[i].name && inputs[i].value == "") {
                           validation_errors.push(inputs[i].name);
                       }
                       if ('participant-signature' == inputs[i].name && inputs[i].value == "") {
                           if (validation_errors.length < 1 && doublecheckblocker <= 1) {
                               ++doublecheckblocker;
                               $('#consent-form').submit();
                               break;
                           }
                           if(doublecheckblocker >= 2){
                               doublecheckblocker = 0;
                           }
                       }
   
                   }
               }
   
           }, false );
       ```
   
 *  [chloemccarty](https://wordpress.org/support/users/chloemccarty/)
 * (@chloemccarty)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/validation-required-issues/#post-14130291)
 * I’m having the same issue after updating to CF7 5.4.
 * Here’s what I did to fix it:
    In this file contact-form-7-signature-addon\public\
   js\scripts.js Before line 57, add this code:
 *     ```
       // Custom Event Listener to populate signature data before submit.
       $(form).find('input.wpcf7-submit').on('mouseover', function() {
           sigObj.beforeSubmit();
       });
       ```
   
 * This forces the signature data to be copied over to the hidden field when the
   user mouses over the submit button, which completes just in time before the form
   actually submits.
    This works on edge, chrome, firefox, android and iphone (safari).
   Noting this could get messed up if the user submits the form a different way (
   e.g. by hitting “enter”) but if your signature field is the last field on the
   page this probably won’t happen
    -  This reply was modified 5 years, 2 months ago by [chloemccarty](https://wordpress.org/support/users/chloemccarty/).
 *  [jordyvanovereem](https://wordpress.org/support/users/jordyvanovereem/)
 * (@jordyvanovereem)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/validation-required-issues/#post-14137707)
 * Hi [@chloemccarty](https://wordpress.org/support/users/chloemccarty/),
 * I placed your code on that line, but i didn’t change anything for me.
    I get 
   an error in the console, it just does not send the form.
    -  This reply was modified 5 years, 2 months ago by [jordyvanovereem](https://wordpress.org/support/users/jordyvanovereem/).
 *  [chloemccarty](https://wordpress.org/support/users/chloemccarty/)
 * (@chloemccarty)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/validation-required-issues/#post-14139721)
 * What error do you get? What browser are you using?
    If you add `console.log('
   hover');` before the `sigObj.beforeSubmit();` in the code I posted above, do 
   you see that log to the console when you go to click the submit button?
 *  [jordyvanovereem](https://wordpress.org/support/users/jordyvanovereem/)
 * (@jordyvanovereem)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/validation-required-issues/#post-14141572)
 * No nothing happens. At this moment i went back 1 CF7 version. I used in chrome
   and firefox.
 *  [frown](https://wordpress.org/support/users/frown/)
 * (@frown)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/validation-required-issues/#post-14142666)
 * Having the same issue with my client site too, whereby upon submission and error
   is found, however validation no longer appears flagging the field – which isn’t
   user friendly.
 * I sussed it out in the browser inspector by checking the error list under the
   hidden screen reader info!
 * Hoping for a solution soon, as it’s not ideal to modify the plugin files directly…
 *  [chloemccarty](https://wordpress.org/support/users/chloemccarty/)
 * (@chloemccarty)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/validation-required-issues/#post-14155577)
 * I was able to resolve the validation issues by using my code above plus [https://wordpress.org/support/topic/cf7-5-4-update-missing-validation-message/#post-14152788](https://wordpress.org/support/topic/cf7-5-4-update-missing-validation-message/#post-14152788)
   to fix the empty validation message.
 * Are you using the normal [submit] shortcode for your submit button in cf7?
 *  [bentenjan365](https://wordpress.org/support/users/bentenjan365/)
 * (@bentenjan365)
 * [5 years ago](https://wordpress.org/support/topic/validation-required-issues/#post-14386769)
 * [@chloemccarty](https://wordpress.org/support/users/chloemccarty/) Thanks for
   saving me..
    appriciate a lot
 *  [waterpeace66](https://wordpress.org/support/users/waterpeace66/)
 * (@waterpeace66)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/validation-required-issues/#post-14534749)
 * I have implemented the fix described and made sure the scripts.js and the class-
   wpcf7-signature-public.php files were updated. My validation issue still exists.
   I am using EDGE to test it.

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Validation Required Issues’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7-signature-addon/assets/icon-256x256.jpg?rev
   =1208819)
 * [Contact Form 7 Signature Addon](https://wordpress.org/plugins/contact-form-7-signature-addon/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7-signature-addon/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7-signature-addon/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7-signature-addon/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7-signature-addon/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7-signature-addon/reviews/)

## Tags

 * [form](https://wordpress.org/support/topic-tag/form/)
 * [js](https://wordpress.org/support/topic-tag/js/)
 * [signature](https://wordpress.org/support/topic-tag/signature/)
 * [submit](https://wordpress.org/support/topic-tag/submit/)
 * [validation](https://wordpress.org/support/topic-tag/validation/)

 * 11 replies
 * 6 participants
 * Last reply from: [waterpeace66](https://wordpress.org/support/users/waterpeace66/)
 * Last activity: [4 years, 11 months ago](https://wordpress.org/support/topic/validation-required-issues/#post-14534749)
 * Status: not resolved