Validate capitalization in text input

  • Profile Image
    mgcaledonian13
    Asked on June 07, 2021 at 06:45 AM
    Screenshot
  • Profile Image
    Michal_S
    Answered on June 07, 2021 at 07: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.png

    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!

  • Profile Image
    mgcaledonian13
    Answered on June 08, 2021 at 01: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.

  • Profile Image
    Michal_S
    Answered on June 08, 2021 at 06: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.

  • Profile Image
    mgcaledonian13
    Answered on June 13, 2021 at 01: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?

  • Profile Image
    Amin_N
    Answered on June 13, 2021 at 09: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.png

    2) Locate the unique name of the desired field:

    1623589333_60c601d542b76_

    3) TOpen the source code:

    1623589418_60c6022add8a2_

    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_

    Result:

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

  • Profile Image
    mgcaledonian13
    Answered on July 04, 2021 at 02: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.

  • Profile Image
    Amin_N
    Answered on July 04, 2021 at 04: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.