I am attempting to build a form with numeric fields that are supposed to limit the choices the user can enter. Here are the choices:
The field should not allow the user to enter a 5 or above. After the fields are all completed, I have a calculation at the end that averages all the data.
I tried to use a drop-down list, but that is formatted as text, and the calculation at the end of the form does not recognize the characters.
Please Help!
Solved! Go to Solution.
Views
Replies
Total Likes
Take a look at the attached. It calculates an average for two drop-down list and two numeric fields, restricting values <= 4.
Steve
Views
Replies
Total Likes
Take a look at the attached. It calculates an average for two drop-down list and two numeric fields, restricting values <= 4.
Steve
Views
Replies
Total Likes
Sorry Steve, a lot of head scratching to get a regular expression test to work.
var vPattern = /[0,1,2,3,4]/;
var result = vPattern.test(xfa.event.newText);if (result == false)
{
xfa.host.resetData("xfa.form.form1.page1.NumericField4");
}
Niall
Thank you, Naiall
I'm a bit of a noob, so I'm not sure how to plug in the expression you wrote (below).
Could you walk me through how I would enter your suggestion?
Thank you!
Views
Replies
Total Likes
Steve, your attachment was not attached. Could you re-send?
Views
Replies
Total Likes
Hi,
You have to log onto the forums to see the attachments / uploads. They are not available through email notifications.
The script is in the example.
Niall
Sorry, I guess I should of thought of that.
As I stated before, kind of a noob....
Robert Gallagher
Safety/Env. Officer, PHS
206-766-7040
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies