Forums

Containers break when verify password class is set

skittle 29 Dec, 2015
In my form I have a password field and a verify password field. In order to have the verify password field check that the contents of the password and verify password fields are the same I have added
validate['confirm:password']
to the class field of the verify password field. This works as expected until containers are added to the mix.

In my case I added a container and defined it as a Tab Area type. Inside, I dropped a few more containers and defined them as Tabs. This all works as expected and produces a nice, neat tabbed form.

Next, I dropped fields into each of my Tab containers and this works fine as well. I then added a password field and a verify password field into one of my Tab containers. At this point everything still worked. Finally, I added the
validate['confirm:password']
to the class field on the verify password field and the tab formatting broke. Tabs are scattered all over the form. Removing the
validate['confirm:password']
from the class field immediately fixes the issue. This can be reproduced using Sliders as the type of container as well.

(As a potential workaround, I would love to just move to CFv5 for this form but I have developed a fairly extensive application with all input forms running modally. All of my CFv4 forms have been configured to automatically close on submit using a bit of Javascript. I have been unable to get CFv5 forms to behave this way and even have an unsolved topic on the forum about that issue which can be seen here http://www.chronoengine.com/forums/posts/f2/t97960/close-modal-window-on-submit.html. I can't have just one form out of dozens that does not behave like the others!)

Thanks in advance for any help!

John
GreyHead 30 Dec, 2015
Hi John,

I don't remember seeing this reported before. Please post a link to the form so I can take a quick look. (If necessary please create a copy form showing the error.)

Bob
skittle 30 Dec, 2015
Hi Bob,

Here are two links.

The first shows the form with
validate['confirm:password']
in the class field of the verify password input. The form appears with the broken tabs (containers).

http://taviationservices.com/index.php?option=com_chronoforms&chronoform=ACContactsAdd-Copy1

The second shows the form with
validate['confirmpassword']
in the class field of the verify password input. The form appears as expected (but of course without password validation working). Notice that only the colon has been eliminated - seems the colon is the culprit and is causing parsing problems. Of course eliminating everything from the class field here also solves the problem.

[url]http://taviationservices.com/index.php?option=com_chronoforms&chronoform=ACContactsAdd-Copy2[/url

Thanks for looking into this Bob.

John
GreyHead 30 Dec, 2015
Hi John,

The URL gives me a 403 Permission Denied error.

Bob
skittle 30 Dec, 2015
Sorry Bob, it should work now.
GreyHead 30 Dec, 2015
Hi John,

Now it's an Apache Internal Server Error :-(

Bob
skittle 30 Dec, 2015
My apologies. It is now fixed.
GreyHead 30 Dec, 2015
Answer
Hi John,

I tracked down the FormCheck documents here and the example for confirm is a bit different:
<input type="text" class="validate['required']" name="password" id="password" />
<input type="text" class="validate['confirm[password]']" name="confirm" /> 
That might be the problem.

Bob
skittle 30 Dec, 2015
That did the trick! Thank you very much Bob!

FYI - I got the questionable snippet for the password verification from this FAQ. Probably a good idea to change it to save others from the same trouble.

Thanks again!

John
GreyHead 30 Dec, 2015
Hi John,

FAQ updated - thanks for the nudge.

Bob
This topic is locked and no more replies can be posted.