Validate capitalization in text input

  • mgcaledonian13
    Asked on June 7, 2021 at 6:45 AM
    Jotform Thread 3144198 Screenshot
  • Michal_S Jotform Support
    Replied on June 7, 2021 at 7:42 AM

    Hello!

    If you'd like to force your fields to be non-capitalized, you can do that by using Custom CSS.

    Here's a demo - try typing capital letters into the Text field: https://www.jotform.com/211572858084058

    To achieve this effect, add this code to your form's Custom CSS:

    field-id1, field-id2{

    text-transform:lowercase!important;

    }

    Replace the text highlighted red with your field's IDs. You can also add more, comma-separated.

    To find your field IDs, navigate to the field's Properties, Advanced, and extend the Field Details section:

    131596 1 Screenshot 10

    You can also make the fields capitalize only the first letter by changing the lowercase in the code above to capitalize.

    Related guides:

    How to Inject Custom CSS Codes

    How to Find Field IDs and Names

    Please let us know if this is not what you meant or you require any further assistance.

    Thank you!

  • mgcaledonian13
    Replied on June 8, 2021 at 1:46 AM

    I seem to be having some sort of error here I can't seem to get a posting saved

    will get back to later.

  • Michal_S Jotform Support
    Replied on June 8, 2021 at 6:07 AM

    Hello!

    Please keep in mind that this will only capitalize the text in the fields visually - if the user types in capital letters, they will show up in the submissions - I apologize for failing to mention this in the beginning.

    Unfortunately, there's currently no option that allows for validating fields for capital letters that affects submissions too if not using full source code embed - I will open a feature request for that, but cannot guarantee implementation or provide an ETA.

    Thank you for your understanding.

  • mgcaledonian13
    Replied on June 13, 2021 at 1:26 AM

    OK, so the Capitalization will not carry through to Submissions and Notifications etc. seems to me a bit of a waste of time making this happen visually on the form but not in the Subs and Notes.

    The reason for wanting it to happen is that it would "tidy up" Notifications and any Reports.

    I did make this request sometime ago but nothing seems to be forthcoming, will it ever happen?

  • Amin JotForm Support
    Replied on June 13, 2021 at 9:16 AM

    Hi again,

    It's possible to apply it to email alerts (not submissions) as follows:

    1) Go to the email template.

    email notification settings Screenshot 10

    2) Locate the unique name of the desired field:

    1623589333 60c601d542b76  Screenshot 21

    3) TOpen the source code:

    1623589418 60c6022add8a2  Screenshot 32

    4) Finally, you need to add the following CSS code into the Style attribute of the HTML tag associated with the unique name:

    text-transform: capitalize !important;


    1623590045 60c6049d2f56e  Screenshot 43

    Result:

    1623589865 60c603e9293e0  Screenshot 54Should you have any further inquiries, we will be more than happy to help.

  • mgcaledonian13
    Replied on July 4, 2021 at 2:17 AM

    OK Thanks for that. Have not tried it yet but I will do.

    Does this mean that "uppercase" will also work?

    For Example.
    <tr id="row_6" class="questionRow">
    <td id="question_6" class="questionColumn" style="padding: 5px !important:" valign="top" bgcolor="#131313"
    width="170">
    Uppercase</td>
    <td id="value_6" class="valueColumn" style="padding: 5px !important: text-ansform:
    uppercase !important:"
    bgcolor="#131313".{uppercase}</td> 

    Thanks for having a further look at this, I will try this as well.

  • Amin JotForm Support
    Replied on July 4, 2021 at 4:59 AM

    Yes, I tested it and I confirm it works and makes all letters uppercase.

    Should you have any further inquiries, we will be more than happy to help.