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

    Is there a way to wrap text inside Spreadsheet widget so that words are kept on one line or another and not broken?

    Asked by saltadministration on February 25, 2016 at 06:04 AM
    Is there a way to wrap text so that words are kept on one line or another and not broken into?  I found the custom css (with your wonderful forum) to create text wrap, but it will break a word into when it runs out of room.
  • Profile Image

    Answered by Boris on February 25, 2016 at 06:30 AM

    I see that you are using the following custom CSS in your spreadsheet widget:

    .A input { width: 50px; min-height: 80px; word-break : break-word; }
    .B input { width: 90px; min-height: 80px; word-break : break-word; }
    .C input { width: 180px; min-height: 80px; word-break : break-word;}
    .D input { width: 220px; min-height: 80px; word-break : break-word;}
    td, th {
    word-break : break-word;

    The word-wrap:break-word CSS is for allowing a word to be broken at any point of the word in order to allow wrapping.

    However, you are applying this CSS to input fields that are built to be single-line inputs. When your users are typing their data into the widget, it will remain on one line in most browsers! Google Chrome and other webkit based browsers allow the singly line input field to appear as if it were multiline by using the word-break CSS, but it works only in those browsers, and the required CSS forces the words to break at any point.

    In Firefox and Internet Explorer, your users will still see everything in only one line:

    If you are looking for a cross browser way to make the single line input fields appear as multiline, and therefore allow word wrapping, I'm afraid that it is simply not possible at this time. The technology is built as such that only textarea elements were designed to be multiline, and our Spreadsheet widget is built to use regular input elements.

    I hope this helps.