HichamWifaq Posted August 8, 2015 Report Share Posted August 8, 2015 Hi all, I'll try to make it simple.. Submission Form. Table of 2 items. 1 dropdown list (records: A, B, C) and 1 number field. In the dropdown list, when I select "A", I would like the number field characters to be limited to 5. When I select "B", I would like the number field characters to be limited to 10. etc etc I tried the "rules" but looks like it's pretty much basic (only enable, hide..stuff like that). The question : How can I make it happen please ?! Thanks beforehand, Quote Link to comment Share on other sites More sharing options...
0 Aurora Posted August 11, 2015 Report Share Posted August 11, 2015 Hi Miello82, You can try this script : <SCRIPT LANGUAGE="JavaScript"> function myFunction() { var dropdown = document.getElementById("InsertRecordYour_Dropdown_Field").value; var number = document.getElementById("InsertRecordYour_Number_Field"); if (dropdown =="A") { number.maxLength="5"; }else if (dropdown =="B") { number.maxLength="10"; } else{ number. maxLength="15"; } } document.getElementById("InsertRecordYour_Dropdown_Field").onchange = myFunction; myFunction(); </SCRIPT> I hope this helps. Aurora Quote Link to comment Share on other sites More sharing options...
Question
HichamWifaq
Hi all,
I'll try to make it simple..
Submission Form. Table of 2 items. 1 dropdown list (records: A, B, C) and 1 number field.
In the dropdown list, when I select "A", I would like the number field characters to be limited to 5.
When I select "B", I would like the number field characters to be limited to 10.
etc
etc
I tried the "rules" but looks like it's pretty much basic (only enable, hide..stuff like that).
The question : How can I make it happen please ?!
Thanks beforehand,
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.