• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Two e-mail addresses must be different

Two e-mail addresses must be different 10 years 4 weeks ago #30897

  • clucking
  • clucking's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 21
  • Thank you received: 2
Hi,

Sorry, this question belongs to RSJoomla Forms Pro - but I cannot change this :-(

The user submitting a form must enter two different e-mail adresses. How do I validate that they really are different?
Each e-mail address field currently has the validation rule 'Email Address'.
Thanks,

Claus.
Last Edit: 10 years 4 weeks ago by clucking. Reason: Wrong forum
The administrator has disabled public write access.

Two e-mail addresses must be different 10 years 3 weeks ago #30934

  • bogdan.tataru
  • bogdan.tataru's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 174
  • Thank you received: 40
You can easily achieve this in RSForm! PRO with some php code inside "Script called on form process" field. Go to Components >> RSForm! PRO >> Manage Forms and edit your form. On Properties tab search for PHP Scripts and in the "Scripts called on form process" add the following php code:
if($_POST['form']['Email']==$_POST['form']['Email2']){
  $invalid[] = RSFormProHelper::getComponentId('Email2');
}

Where "Email" is the name of the first email address and "Email2" the name of the second one. Note that if the values are identical the second email address field will be invalidate. Remember to not include the <?php and ?> tags.
My help is not official customer support. To receive assistance, submit a ticket by clicking here
The administrator has disabled public write access.
The following user(s) said Thank You: clucking
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!