Increase/Limit Number of Characters in RichTextBox - InfoPath Dev
in

InfoPath Dev

Increase/Limit Number of Characters in RichTextBox

Last post 10-11-2012 10:33 AM by SP2010Newbie. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 10-10-2012 10:06 AM

    Increase/Limit Number of Characters in RichTextBox

    Hi there, I have a rich text box (with out table, images or hyperlinks). I validated the text box using string-length(.) > 250 Problem here is when i enter 250 chars and click save..it saves perfectly but when i edit the record it shows me the red ribbon (my custom message "more than 250 chars"). I added a new text box to the form to display the number of chars of the richtextbox and found out that number of chars increases by 4. ex: I enter 250 chars and click save. when i open the record it shows me up that the number of chars is 254. When i edit the filed and clear 1 char then it shows up to be 249. i.e it is adding 4 chars to the value. Please help me out here
  • 10-11-2012 10:23 AM In reply to

    Re: Increase/Limit Number of Characters in RichTextBox

    Have you considered using a multiline text box instead? Rich text length can be inconsistent sometimes so using a multiline text box may be better for your scenario.

    Anson Hidajat
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™

  • 10-11-2012 10:33 AM In reply to

    Re: Increase/Limit Number of Characters in RichTextBox

    As per our business requirements we need Rich text box, users may not need images, tables or urls but they use font, color, bold in the text. I figured out the solution though. I came to know there is extra space that is being added once saved. So using the following validation i was able to over come it. string-length(normalize-space(.)) > 250
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.