Home › Forums › Quform WordPress › Email confirm validation
- This topic has 6 replies, 3 voices, and was last updated 7 years, 6 months ago by
Sweeps.
- AuthorPosts
- January 5, 2018 at 12:15 pm #23719
Sweeps
ParticipantHi,
i have followed the guide here – https://support.themecatcher.net/quform-wordpress-v2/guides/customization/confirm-email-field
and opted to create a plugin rather than editing the functions file and this is the code:<?php /* * Plugin Name: Quform Custom Code Move Form * Description: Custom code for Quform Move Form. * Version: 1.0 */ // Paste in your custom code below add_filter('quform_5_5', function ($valid, $value, Quform_Element_Email $element) { if ($value != $element->getForm()->getValue('quform_5_21')) { $element->setError('The email addresses do not match'); $valid = false; } return $valid; }, 10, 3);
I have tried with and without the ‘quform_’ text before the unique ID but can’t seem to get it to work. Is there something I am doing wrong?
Thanks in advance,
Sweeps
- This topic was modified 7 years, 6 months ago by
Sweeps. Reason: Forgot to tick notify on response
Attachments:
You must be logged in to view attached files.January 8, 2018 at 1:11 am #23733Venom
ParticipantPlease try to rename ‘quform_5_5’ to ‘quform_element_valid_5_5’
January 8, 2018 at 2:10 pm #23737Sweeps
ParticipantHi,
With your recommended change I get
‘There was a problem
The response from the server was invalid or malformed’This is the form – http://new.paymentspro.co.uk/moving-umbrella/
- This reply was modified 7 years, 6 months ago by
Sweeps.
January 9, 2018 at 8:07 pm #23773Ally
Support StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
January 10, 2018 at 9:55 am #23782Sweeps
ParticipantStill not joy so set debug mode and this is the error in the log –
[10-Jan-2018 09:43:23 UTC] PHP Catchable fatal error: Argument 3 passed to my_confirm_email() must be an instance of Quform_Element_Email, instance of Quform_Element_Text given in /var/www/vhosts/paymentspro.co.uk/new.paymentspro.co.uk/wp-content/plugins/quform-custom-code-move/quform-custom-code-move.php on line 11
January 10, 2018 at 12:34 pm #23788Ally
Support StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
January 10, 2018 at 1:17 pm #23793Sweeps
ParticipantDoh! Working now. Many thanks and apologies for my daftness.
- This topic was modified 7 years, 6 months ago by
- AuthorPosts
- You must be logged in to reply to this topic.