How to allow only alphabets in the Full name field

  • anjanapairathod
    Asked on May 29, 2021 at 2:53 PM

    Hi,

    I want to be able to allow only alphabets in my Full Name field - I dont see a validation option like we have for short text.

    Also I am curious why is the validation option not provided for this widget and only for short text?

    I understand that I can use the short text instead of Full Name but then it will give me just one field "Name" instead of the two fields "First Name" and "Last Name" provided by Full Name widget.

    Also if I change the form fields I will have to do some changes in my website code as well - where this field data is used.

    Would be great if you could help me if there is a way to implement the validation on my existing Full Name widget without modifying the widget type.


  • Jed_C
    Replied on May 29, 2021 at 8:56 PM

    It is not possible to validate Full Name field from our editor, however, you can validate your input using Short Text Entry fields.

    How to allow only alphabets in the Full name field Image 10

    If you really want to use Full Name field, you can try to inject javascript into the source code: https://www.jotform.com/help/104-How-to-get-the-Full-Source-Code-of-your-Form

    Let us know if you have any questions or if you need further assistance.

  • anjanapairathod
    Replied on June 6, 2021 at 12:24 PM

    Hi, I am using the form url to embed the form onto my website, if I put a javascript validation in the source code will it reflect on the url? I mean will have to use the source code then to embed?

  • John Support Team Lead
    Replied on June 6, 2021 at 1:56 PM

    I think what's best is to embed the source code of the form itself into your site, then add custom javascript for the input validation.

    Here's a guide on how-to-get-the-full-source-code-of-your-form.

    Please try that and see if it'll work for you.