In which field do I enter the JavaScript for charLimit?
If you can answer all 5 of my questions, separately, that would really help me.
I have a form that captures information for new employees hired. In the "First Name" field, I am trying to set the maximum character limit to 20. I double click the "First Name" field, and go to the "Validate" tab. I presume this is where you should enter this code. So I have this.
var f = this.getField("First Name");
f.charLimit = 20;
This is not working.
However, just to test things out, if I try the following code (still under the Validate tab, within the "First Name" field) to set the limit for the Zip Code field to 2 characters, this does work:
var f = this.getField("ZIP");
f.charLimit = 2;
1. To get the charLimit property to work for the "First Name" field, which field do I have to enter this code in? Also, which tab?
2. Why would it be possible to set the character limit of one field from another field (like the Zip code example)? If I wanted to set the value of a field, shouldn't I be able to type the code under the Validate tab associated with that field?
3. Consider this part of the code this.getField("First Name");
1. Which field does the word this refer to?
2. getField( ) is a method of which object?
