Joomla 5 Notice

We are pleased to announce that as of January 29, 2024, all of our Joomla extensions are compatible with Joomla 5.

For all who are still updateing from Joomla 3 to Joomla 4: Joomla 4 Migration instructions are available here:

There is now a separate Documentation for Visforms for Joomla 4 and for Visforms for Joomla 5!

Forum

Visforms Subscription user can ask questions in our forum. Please log in with the relevant user first.
Everybody can access the forum for reading.

Please only ask 1 question per topic.

Important information for almost every question:
V1: Which Visforms version is running?
V2: Which Joomla version is running?
V3: Which PHP version is running?

Compare email addresses for validation

More
10 years 2 months ago #832 by IreneLennings
Compare email addresses for validation was created by IreneLennings
Dear Aicha,

I'm ever so pleased with Visforms!

Here is a suggestion:
Would it be possible to add the following to the form validations:
Check that "email address" and "repeat email address" contain the same email addresses?

Hope to hear from you!
Regards
Irene

More
10 years 2 months ago #833 by Administrator AV
Replied by Administrator AV on topic Compare email addresses for validation
Hi Irene,

I will implement that feature but I cannot say exactly when. I have so many good feature requests on my list and only limited time.

Take a look at that post
www.vi-solutions.de/en/forum-index/17-jo...assword-confirmation
You would have to use f_email_validate_equalTo and the id of the email which contains the original email you want to compare with as the numeric part in #field. One drawback, I think when you edit the field in backend the changes you made in the database will be lost.

Another option would be to create an template override of the default.php that creates the frontend view. (It's basically explained in www.vi-solutions.de/en/forum-index/19-jo...logged-in-users-only how to do that). You have to add a rule to the validator than. Search the file (the copied default.php) for "var validator". A little bit further in the code you find a closing curly bracket } and in the next line a comment //recaptcha code...

Just insert the following code after the closing curly bracket
Code:
echo '"email2" : {equalTo : "#field3"},';

You have to replace "email2" with the value of the name attribute of the second email input (which is actually the value you used as input for the "Name" in the field definition) and #field3 with the value of the id attribute of the first email input. (which is the string "#field" and the id of the form field, which you can find in the field definition in backend as well).

As you type in the validation rule "hard-coded" with actual name attribute and id attribute values, this validation will be performed on all forms, but if you make sure you to not use the same field name (in my case email2) in any other form, that should have not consequences, because the rule is only performed for fields with name attribute value "email2".

If you need further information or help, don't hesitate to ask!

Regards,
Aicha

:idea: I recommend you the new and up-to-date documentation for Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/en/docs/
Most of this also applies retrospectively to Joomla 3.
Please only ask 1 question per topic :-).

:idea: Ich empfehle Dir die neue und aktuelle Dokumentation für Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/docs/
Das meiste gilt rückwirkend auch für Joomla 3.
Bitte immer nur 1 Frage pro Thema stellen :-).

More
10 years 2 months ago #847 by IreneLennings
Replied by IreneLennings on topic Compare email addresses for validation
Dear Aicha,

I cant get it to work. Wrong directories, maybe?
Here's the url:
denieuweakker.nl/DNA2014Joomla/index.php...uin/deelnemer-worden

I added the following code in DNA2014Joomla/templates/denieuweakker/com_visforms/visforms/default.php:
echo '"emailherhaling" : {equalTo : "#field42"},';

Here:
<?php
}
//recaptcha code comes from google api. Because we use the joomla recaptcha plugin we cannot change much field attribute values... and have to include a rule for the captcha
if (isset($this->visforms->captcha) && ($this->visforms->captcha == 2))
{
echo 'recaptcha_response_field : { required : true},';
}
echo '"emailherhaling" : {equalTo : "#field42"},';
?>
But nothing happens when I enter two different emailadresses.
Could you help me out?
Very much appreciated!

Lenneke

More
10 years 2 months ago #848 by Administrator AV
Replied by Administrator AV on topic Compare email addresses for validation
Hi Irene,

you have missed a folder in your path.
You have to create a folder named html inside the denieuweakker folder.
The com_visforms folder goes inside that html folder, so the correct path would be:

DNA2014Joomla/templates/denieuweakker/html/com_visforms/visforms/default.php

The code itself looks ok, but it is difficult to read all ' and " and ; in a forums post, so it it still don't work after you fixed the path, please let me know.

Regards,
Aicha

:idea: I recommend you the new and up-to-date documentation for Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/en/docs/
Most of this also applies retrospectively to Joomla 3.
Please only ask 1 question per topic :-).

:idea: Ich empfehle Dir die neue und aktuelle Dokumentation für Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/docs/
Das meiste gilt rückwirkend auch für Joomla 3.
Bitte immer nur 1 Frage pro Thema stellen :-).

More
10 years 2 months ago - 10 years 2 months ago #850 by IreneLennings
Replied by IreneLennings on topic Compare email addresses for validation
YES!
I'm ever so pleased!

And now for something I'll look into myself first.
"Message succesfully sent" is not presented in a separate modal but in another modal that opens with a button on same page.
I use extention "nonumber modals".
Fascinating!
I'll let you know what I'll find out. I might need your help again :)
Workaround: I can deactivate these buttons on the pages with a form!

But in the meantime: thanks ever so much!!!

Irene (Lenneke)
Last edit: 10 years 2 months ago by IreneLennings. Reason: wrong smiley

More
10 years 2 months ago #852 by IreneLennings
Replied by IreneLennings on topic Compare email addresses for validation
I'm opening a new item for the nonumber modal problem

Moderators: Administrator AVAdministrator IV
Powered by Kunena Forum