Hi Neil,
You can access the fields by name via JS on a form. For example, if your field is called 'country' then 'country.value' will contain the current value and 'this.value' will contain the value of the current field, so you shouldn't need to find them by id.
You may know this already but you can add a 'debugger;' statement into the form JS and step through it in inspector.
With regards to the actual problem you are trying to solve, I don't think you can change the maximum length/validation expression of the field programatically (setting validatePictureClause and maximum didn't work for me).
Unless anyone else replies and knows of a way to change the validation expression/maximum length, would having a few fields with different validation work?
That way you could show/hide them based on the logic you need - it would also have an advantage that you could easily vary the title as well. e.g. UK "Post Code"
P.S. if anyone from Adobe reads this - Is the guidebridge documentation for setProperty wrong?
Adaptive Forms Class: GuideBridge
guideBridge.setProperty(["SOM_OF_FIELD_1"]
"visibility"
[false]);
I think it is missing two commas between the parameters and also the property looks to be called 'visible' as opposed to 'visibility' e.g:
guideBridge.setProperty(["guide[0].guide1[0].guideRootPanel[0].zip[0]"],
"visible",
[false]);
Thanks,
James