What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    How to remove last name from the name field

    Asked by ascetinteractive on December 06, 2012 at 09:34 PM

    I need help on how to remove last name from the name field

  • Profile Image
    JotForm Support

    Answered by abajan on December 06, 2012 at 10:31 PM

    Thanks for asking.

    If you're referring to what is displayed in email alerts, please have a look at this thread. Conversely, if you mean that you want to prevent the last name from being displayed on the form, inject the following rule, substituting the correct ID number (highlighted in red) in the selector:

    #last_1, [for=last_1] {
    display: none;
    }

    Attribute selectors don't work in IE6 and below but so few people use that browser nowadays that it's not a major issue. However, if you do need to accommodate such users, substitute the following rule for the above:

    #last_1, #sublabel_last {
    display: none;
    }

    Unfortunately, due to lack of specificity, if the form contains multiple full name fields, that second version would affect the sublabels of all of the form's last name fields, resulting in some pretty awful misalingment.

    Lastly, It should be noted that while the fullname {tag} can be manipulated to display only certain elements, that action has no affect on the submissions records. In other words, a blank "Last Name" column would still be there.

    If you need additional information on anything above, we'd be happy to supply it.

  • Profile Image
    JotForm Support

    Answered by abajan on December 06, 2012 at 10:40 PM

    Incidentally, this form illustrates injected CSS being used to hide the last name of its first full name field. If you clone it and go into its injected CSS and comment out the first rule instead of the second, you'll see the misalignment to which I referred.