Jump to content
  • 0

Rule On Number Of Characters



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.




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

  • 0

Hi Miello82, 


You can try this script :



 function myFunction()

   var dropdown = document.getElementById("InsertRecordYour_Dropdown_Field").value; 
   var number  = document.getElementById("InsertRecordYour_Number_Field");

  if (dropdown =="A") {

    }else  if (dropdown =="B") {

    } else{
        number. maxLength="15";

document.getElementById("InsertRecordYour_Dropdown_Field").onchange = myFunction;


I hope this helps.
Link to comment
Share on other sites

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.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...