How can I set a total character limit across multiple (4) fields?

  • Profile Image
    szaboagnes
    Asked on November 12, 2014 at 09:56 PM
  • Profile Image
    gori-mathew
    Answered on November 13, 2014 at 01:56 AM

    Thank you for contacting us.

    If I got your question correctly you want to set a total character limit across 4 fields to achieve this You may try to consider using Max Size option on the text fields instead. Since the total will be "60", set limit on each of the 4 fields to "15" so the total would be "60". Would this help?

    I hope this helps

    Thanks!

  • Profile Image
    szaboagnes
    Answered on November 13, 2014 at 05:34 AM

    Thank you for your answer!

    What I am trying to achieve is to have four text box, with no character limits for each, but a combined limit for four of them together. So if I set the limit to 100, user can write 10 in the first, than 50, than 20, and for the last one only 20 remains, but he can choose how to arrange those 100 characters between the four fields. The greatest thing would be if I could set min-max characters for each, and a combined limit for the four of them, but that is not so important.

    Is this possible at all?

  • Profile Image
    ashwin_d
    Answered on November 13, 2014 at 08:04 AM

    Hello szaboagnes,

    Unfortunately we do not have such feature. Unless you download your form's full source code and add some custom code to calculate the input character in a set of fields, it is currently not possible to achieve your requirement. 

    If the input of your textbox has a fixed predefined format, you may also like to check our "Fixed Format" widget and see if this fits in your requirement.

    Thank you!

  • Profile Image
    szaboagnes
    Answered on November 13, 2014 at 11:57 AM

    I wish I was smart enough to add custom codes to JF :)

    I could not use Fixed Format, because only need to count characters in texts up to 2400 caracter.

    Would be nice to tie the four form field's character limits together, and show a 'remaining characters' counter underneath them somehow, but nevertheless, your site and the provided support is the best thing that can happen to anyone in need of creating a form :) Thank you!

  • Profile Image
    EltonCris
    Answered on November 13, 2014 at 12:29 PM

    @szaboagnes 

    We'll try to come up a sample script for you during our free time. Take note, you can only apply this on your form source code not within the form builder.

    Let us know which form you're trying to implement this and the name of the fields you want to apply this limit so we can provide you example out of your form.

    Thanks!

  • Profile Image
    BibleLeagueCanada
    Answered on September 04, 2015 at 09:31 AM

    Hi EltonCris,

    Is it possible to do this (adding this kind of script) to a form that is stilled hosted by JotForm? I.e. by adding the script in the Form Designer? Or where else would you add it?

    Can I provide you with the form and name of the fields that I would like to limit in order to get a script to limit the characters (including spaces) to a combined 8000 characters?

  • Profile Image
    david
    Answered on September 04, 2015 at 11:49 AM

    Unfortunately, as my colleague stated, you can only apply scripts to source code embedded forms, not to the forms themselves.  There are too many risks and potential technical issues with allowing scripts to be directly added to forms.