PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Hook / Filter Before Validation

  1. bsandall
    Member

    Good Afternoon

    I've created a function which will update a value on my form. I'd like to check this value as part of the validation routine. The Pre Submission hooks and filters fire after the validation has taken place not giving an opportunity the change the value.

    How best can I fire this function before validation occurs without placing it in gform_validation?

    Thank you.

    Ben

    Posted 11 years ago on Monday July 9, 2012 | Permalink
  2. David Peralty

    Why don't you want to place it in the validation hook? Are you using what exists in the form and manipulating that value? Or are you just placing in your own value?

    Posted 11 years ago on Monday July 9, 2012 | Permalink
  3. bsandall
    Member

    Hello David

    Thanks for your reply.

    Hidden on the form are a encrypted and hash value. The function takes these values, decrypts them and updates a hidden value. If the hash/encrypted values have changed then the update value is "error".

    I guess I could place this in the validation hook but wanted to move the logic away from here.

    Thanks

    Ben

    Posted 11 years ago on Monday July 9, 2012 | Permalink