Validation JavaScript

Issues related to forms.
Post Reply
User avatar
bigdaddyk
 
 
Posts: 4
Joined: Sun Sep 03, 2017 3:16 am

Validation JavaScript

Post by bigdaddyk »

Hello WWB Users!

I was recently making some updates to a form on a site that I created back with WWB8. I'm using the current version of WWB15 and upon testing the form I've noticed the validation isn't in the same tab or Z-Order. The page uses a layer as a form which doesn't have the same right-click ability to arrange objects on the form however, the object manager and the email sent by submitting the form shows that the objects are in the correct order. Its not a huge deal its just I've never noticed it before in earlier WWB versions. From a user point of view its kind of a hassle when the validation bounces all over the form and doesn't validate the fields in order.

As a work around I will manually edit the validation script in Dreamweaver.

Just curious if anyone else has noticed this inconsistency in a recent version of WWB.

Thanks!

Kevin
Big Daddy K
User avatar
Pablo
 
Posts: 21574
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Validation JavaScript

Post by Pablo »

I doubt that this has anything to do with the latest version. This functionality has not changed.
The validation script executes in the order of the objects as they appear on the page (= z-order), not the tab order.
You can re-arrange the objects with the 'arrange objects' in the Object manager.
User avatar
bigdaddyk
 
 
Posts: 4
Joined: Sun Sep 03, 2017 3:16 am

Re: Validation JavaScript

Post by bigdaddyk »

Pablo,

All Objects are arranged in proper order. I have a feeling it may be related to custom code I've added but the validation script output is not in the same order as objects on page.

I plan on testing a copy of the form today without any custom code and will update this post as to the results.

Thanks Pablo!
Big Daddy K
User avatar
Pablo
 
Posts: 21574
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Validation JavaScript

Post by Pablo »

If you look at the generated code then the validation script should be in the same order as order in the Object Manager. The code is not generated randomly, that would actually be much more difficult to do;)
User avatar
bigdaddyk
 
 
Posts: 4
Joined: Sun Sep 03, 2017 3:16 am

Re: Validation JavaScript

Post by bigdaddyk »

Pablo,

I finally discovered what was causing the issue.

I am using layout grids for my form fields and I added 2 edit boxes to the middle column of an existing 3-column layout grid, making sure the z-index and tab order were correct. The generated script placed validation for the 2 added items at the end of items on layout grid instead of their logical order.

The incorrect order for the validation script generated was caused by altering the z-index or adding/removing the items on the layout grid. Removing all items and dropping them back onto grid in order solved the problem.
Big Daddy K
Post Reply