Maximum characters validation fails when form is embedded

  • JORGE_GARCIA
    Asked on November 20, 2015 at 1:14 PM

    Hi.
    I have prepared a form with limited key strokes and characters per line. I have incorporated this limitation 'a posteriori' on my site with JS. It works perfectly. Also I have on my form a preview option for the user to change something before shipping. As the edition of the submission, before final shipment, is in JotForm and not in my site, the limitation disappears and the user can write to their hearts content. Any solution? Thanks in advance.

  • David JotForm Support
    Replied on November 20, 2015 at 2:01 PM

    Hi,

    I checked your page and it looks like you have embedded your form using the full source code.  Doing so allowed your form to fully interact with the rest of your page.  This may cause some unintended conflicts with scripts already running in your page, causing the validation to fail. 

    Try replacing your current embed code with the iFrame code:

    http://www.jotform.com/help/148-Getting-the-Form-iFrame-Code

    This will insulate your form from the rest of your page and allow it to function the same as it does when not embedded.

    If that still does not allow for the validation to work, let us know and we will be happy to have another look.

  • JORGE_GARCIA
    Replied on November 20, 2015 at 3:39 PM

    This is the result of his proposal (iFrame). The form is cut off.

    http://charmingpostcards.blogspot.com.es/2015/11/proba-4.html

    Maximum characters validation fails when form is embedded Image 1 Screenshot 20

    I continue in the next message.

  • JORGE_GARCIA
    Replied on November 20, 2015 at 3:43 PM

    The source code is the only one that works properly. In it, I can embed the JS function to control the key strokes and characters. As I said in my previous message the Preview option I have installed works with submission of JotForm

    https://submit.jotformeu.com/submit/53232969187365/

    Maximum characters validation fails when form is embedded Image 1 Screenshot 20

    and with conditionals, it not sent to the email address until the option of sending is pressed.

    Look again my form

    http://charmingpostcards.blogspot.com.es/2015/10/paisaje-h.html

  • David JotForm Support
    Replied on November 20, 2015 at 4:09 PM

    There is no way to insert your javascript into the form itself.  If your limitation is coming from the script added to your site, then the script is limited to that scope.  Since the preview is a JotForm pop-up, there is no way to use your script within the form. 

    You can set a limit to the number of characters allowed in a Text field:

    Maximum characters validation fails when form is embedded Image 1 Screenshot 20

    Though there is no way to add your script to the form itself.