Possible bug with validataion

chriso0258 11 Aug, 2015
Hello,

I discovered something you may or may not consider a bug but I thought I'd bring it up. I have two drop down menus where the "Other" box is disabled unless "Other" is selected in the drop down box as you can see below.
[attachment=0]disabled1.jpg[/attachment]

When I add a server side validation and the parameter is not to leave a field empty (in this case the State Tag box), then the "Other" boxes become active when the error message is displayed not to leave a box empty as you can see in this picture.
[attachment=1]disabled2.jpg[/attachment]

Just thought I'd point this out.

Kind regards,
chriso0258 11 Aug, 2015
Hello again,

I did a little more testing and this could be a problem to some. If the user then completes the form by using the drop down menus, both the Type and Brand are blank in the debugger. I also noticed my date pickers don't work either.
GreyHead 11 Aug, 2015
Hi chriso0258,

I think that you are right- this is a bug (or maybe a missing feature). It is true of all the built in event handling that the code needs to be re-run when the page is re-loaded and that doesn't happen at present (it's typically only triggered when there is a change in the 'parent' element i.e. a box is checked or a drop-down selection made).

At the moment I don't know if it possible to find a simple way to re-trigger this without having to duplicate the code :-(

I'm working on a form at present where this is a potential problem - I'll see if I can figure out a solution.

Max may also have this on his to-do list for a future release.

Bob
chriso0258 12 Aug, 2015
Hello Bob,

Just for your info, I did some more experimenting. I wrote my own validation using php and used an event switcher. I put the event loop in the on Fail section and tested my validation. Everything on the form continued to work when the event loop reloaded the page. All drop downs continued to work and activated their related linked text boxes if they had any. The linked text boxes remained disabled if that was the original state. Even the data picker continued to work as usual.

The only exception was if a drop down menu had a linked text box that was used when (in my case) "Other" was selected. When the page was reloaded, the data remained in the text box (which was good), but the drop down box showed "Please select a brand". If "Other" was not selected again, no data for that field would pass on submit. This is not a big deal in my case. I only wanted to share with you that the event loop was working better with the event switcher.

Regards,
Chris.
This topic is locked and no more replies can be posted.