Limiting the number of Lines in a Multiline textbox - InfoPath Dev
in

InfoPath Dev

Limiting the number of Lines in a Multiline textbox

Last post 07-21-2016 11:59 AM by Hilary Stoupa. 17 replies.
Page 1 of 2 (18 items) 1 2 Next >
Sort Posts: Previous Next
  • 07-21-2016 04:15 AM

    Limiting the number of Lines in a Multiline textbox

     I have created a form for returning deployers that requests their experience.  The employees are writing small novels in this space and so when we print out the form for the placement boards to try and decide where to put them on their return, they cant see half of the experience.  I want to limit how much they can put into this block.  I have already tried to limit the number of characters but this does not have the desired outcome.  What I really need to do is limit the number of lines that they put into the multiline textbox.  Is there any way to do this?  Maybe with a validation rule?

  • 07-21-2016 08:09 AM In reply to

    Re: Limiting the number of Lines in a Multiline textbox

    Is this rich text? or plain text? I'm curious why the character limit isn't providing the desired outcome.... validation rules can use regular expressions, so there may be a way to do it with validation.
    Hilary Stoupa

  • 07-21-2016 09:53 AM In reply to

    Re: Limiting the number of Lines in a Multiline textbox

     This is plain text. limiting characters allows too many variable's.

     the goal is to prevent them adding so much text that it establishes a scroll bar.  because when I print the filled in form to be viewed by my bosses, text boxes that have the scroll bar will only print out the text that is on the screen when I hit print. 

    say I set the number of characters to 1000. 1000, lower case i's takes up a lot less space then 1000 uppercase W's so depending on the number of uppercase letters they use alters the space that their input takes up.  also carriage returns... if they hit enter twice, they may have only used 100 characters but they will already have caused the text to run outside of the space that I would like to limit, creating a scroll bar on the side.  I hope I am making sense. 

  • 07-21-2016 10:28 AM In reply to

    Re: Limiting the number of Lines in a Multiline textbox

    I understand now - thanks. Is this a browser form or a filler form?
    Hilary Stoupa

  • 07-21-2016 10:35 AM In reply to

    Re: Limiting the number of Lines in a Multiline textbox

     It is a browser form

  • 07-21-2016 10:41 AM In reply to

    Re: Limiting the number of Lines in a Multiline textbox

    When your users fill out the form, do they do it in a web browser? Or does the form open up in InfoPath on their desktop?
    Hilary Stoupa

  • 07-21-2016 10:43 AM In reply to

    Re: Limiting the number of Lines in a Multiline textbox

     Ok, it is definitely a browser form

  • 07-21-2016 10:54 AM In reply to

    Re: Limiting the number of Lines in a Multiline textbox

    So - here are the complications I can see. Even if we could validate on a line break character (which may be possible) - we won't have one where the line has merely wrapped. In Filler, we can set text boxes to expand to show all content - that doesn't work in the browser. I'd suggest adding a print view, where you use a calculated value to show the entered text - that will expand to show all. Then when you need to print, switch to that view first....
    Hilary Stoupa

  • 07-21-2016 10:57 AM In reply to

    Re: Limiting the number of Lines in a Multiline textbox

    I know how to do another view, but how would I set "a calculated value to show the entered text - that will expand to show all"?

  • 07-21-2016 11:02 AM In reply to

    Re: Limiting the number of Lines in a Multiline textbox

    When you add a calculated value control you can pick the field (or formula) to display. The calculated value control will show all the text, I believe - you should be able to just leave the height at auto.
    Hilary Stoupa

  • 07-21-2016 11:05 AM In reply to

    Re: Limiting the number of Lines in a Multiline textbox

     could I just set the "calculated value" that expands the field as it is filled on my already established view?

  • 07-21-2016 11:17 AM In reply to

    Re: Limiting the number of Lines in a Multiline textbox

    Sure. Users can't type in a calculated value control, so you'd have to leave the text box too.
    Hilary Stoupa

  • 07-21-2016 11:25 AM In reply to

    Re: Limiting the number of Lines in a Multiline textbox

     Ms. Stoupa,

    I think this will work.  Thank you very much for the help on this.

    one last question, do you know of a way for me to quickly recreate my form from default into my new print view?  Then I can go through and just change all of the control types from "text boxes" to "calculated value" 

  • 07-21-2016 11:36 AM In reply to

    Re: Limiting the number of Lines in a Multiline textbox

    In your current view, select everything (CTRL a to select all) then copy it (CTRL c). Click in your new view and paste (CTRL v). You can then right click the text boxes and use the change control option from the context menu.
    Hilary Stoupa

  • 07-21-2016 11:41 AM In reply to

    Re: Limiting the number of Lines in a Multiline textbox

     ma'am,

     you are a rock-star!

    I know I said one last question, but now I have some more questions,

    How can I test this?  I go into preview, but there is no option to switch views in preview. 

Page 1 of 2 (18 items) 1 2 Next >
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.