Limit Size of Input in Rich Text Box - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Limit Size of Input in Rich Text Box

Last post 09-05-2012 07:48 AM by cheraideva2. 30 replies.
Page 2 of 3 (31 items) < Previous 1 2 3 Next >
Sort Posts: Previous Next
  • 04-25-2008 09:40 AM In reply to

    • Albert
    • Top 500 Contributor
    • Joined on 04-03-2008
    • The Netherlands
    • Posts 32

    Re: Limit Size of Input in Rich Text Box

    You could try to add datavalidation to a field. For example: field1 does not match pattern ([a-zA-Z0-9])*
    Now the textfield will only accept a-z, A-Z and 0-9. Ofcourse this doesn't fix the 'special characters', but in a way japanese and chinese characters are special characters too.
     
    Albert
     
     
  • 04-28-2008 02:53 PM In reply to

    Re: Limit Size of Input in Rich Text Box

    This can be pretty complicated. It's not an easy task. But some creative use of pattern matching might give you what you want. You will need to research Regular Expressions to understand how to write your pattern. Good luck!

  • 06-04-2008 09:23 AM In reply to

    Re: Limit Size of Input in Rich Text Box

    I have a textbox where I want to only allow a specific number of characters.  For example, textbox for bank routing number must match 9 characters.  If the user inputs anything other than 9 numbers I will create a rule with message box "Please enter a valid 9 digit routing number".

    It seems I can easily "Limit text box to" for a maximum but I cannot find out how to set a minimum for this to function properly.  I don't want someone submitting a form where they accidentally left off 1 digit of thier routing number.   Any Ideas?

    Kevin
  • 06-04-2008 11:05 AM In reply to

    Re: Limit Size of Input in Rich Text Box

    You can add a rule which checks string-length(.) != 9 and then pops up a message... but what you really want is to use custom validation which tests for exactly 9 characters and then gives an error if it's not. If the user can leave it blank, you will need to allow for that in the custom validation as well.

  • 12-08-2008 01:55 AM In reply to

    Re: Limit Size of Input in Rich Text Box

    Hi Greg,

    I am hosting browser enabled Infopath forms in Sharepoint using Infopath Forms Service.

    Now these Infopath forms contains RichText box controls and all the I dont want to allow the users for formatting on the input text.

    For this I am wondering how I could hide the formatting Ribbon that we get on top of richtextbox control,so that users can not format on the Input text.

    I could have choosen textbox control than Richtext box,but the limitaion on the normal textbox control is that, the character limit is upto 255 characters and at the same time I cant start writing the character in new line.

    Point of discussion is thet, how I could hide the richtext box formatting ribbon for richtextbox control,even if formatting is disabled in Richtextbox control on browser enabled forms it is displaying thet ribbon.

    Thanks & Regards,
    Srikrushna Patro.
  • 12-08-2008 02:02 AM In reply to

    • Anuma
    • Top 25 Contributor
      Female
    • Joined on 07-20-2005
    • India
    • Posts 525

    Re: Limit Size of Input in Rich Text Box

    Hi,

     

    You can use text box instead of rich text box. And check "paragraph Breaks" and "Wraptext" check boxes in the Display tab of the text box properties. Now this field work same like rich text field and formatting will not work.

    BTW, Where did you see the 255 chars limitation for text box.

    Anuma Chinthapalli /
    http://www.GGKTech.com
  • 12-08-2008 02:12 AM In reply to

    Re: Limit Size of Input in Rich Text Box

    Hi,

    I think you are talking about the limitation of 255 characters in SharePoint.To remove limitation we have a workaround.

    1. Open Manifest in Visual Studio.
    2. Search for “listProperties”.
    3. Add the “aggregation="plaintext"” for the field you want to show the complete text in promoted column.

    Note: If you modify this promoted property in the form, the above attribute will no longer be available for that promoted field. you need to add this again as Promoted field.

    Madhuri
    http://www.ggktech.com
  • 12-08-2008 03:24 AM In reply to

    Re: Limit Size of Input in Rich Text Box

    Hi Madhuri ,

    <xsf:listProperties>            <xsf:fields>                  <xsf:field name="Field 1" columnName="{0E861CAB-A7EC-4D83-A18F-CCEFD4D84D08}" node="/my:myFields/my:field1" type="xsd:string" aggregation="plaintext"></xsf:field>            </xsf:fields>

          </xsf:listProperties>

    "Field 1" is the promoted column in my case and I have specified aggregation="plaintext"  in the above XML .

    Still not working ! Always taking 255 characters.Please suggest me, if I am missing anything !

    Thanks & Regards,
    Srikrushna Patro.
  • 12-08-2008 04:12 AM In reply to

    Re: Limit Size of Input in Rich Text Box

    Hi

    1.Open the modified manifest.xsf file in infopath design mode

    2.Go to Form Options->PropertyPromotion

    3.Delete the field1(PlainText) field in the promoted list

    4.Now add the field1 as Promoted field

    3.Republish it to the SharePoint.

     

    Madhuri
    http://www.ggktech.com
  • 12-08-2008 04:12 AM In reply to

    • Anuma
    • Top 25 Contributor
      Female
    • Joined on 07-20-2005
    • India
    • Posts 525

    Re: Limit Size of Input in Rich Text Box

    Hi,First remove that promoted Field from the Promoted properties and publish that form to SharePoint.Now agian add that promoted field and add "aggregation="plaintext"" in the manifest.xsf file. And publish to the sharepoint.

     

    Anuma Chinthapalli /
    http://www.GGKTech.com
  • 03-11-2009 04:09 PM In reply to

    Re: Limit Size of Input in Rich Text Box

    Hi,

     I would want to limit the max size of the text box to 60 characters. One way to acheive this is through Text Box properties - Display - Limit the Size...

    Another way to use regular expression as .{0,60}...

    But I would want to show a validation error at run time if user enters more than 60 characters and when user shifts control to next field....the above two options doesn't allow the user to enter more than 60 characters...

    Could any of you help me in acheiving this please...

     By the way, I have used the RegEx .?.?.?.?.?.?.?.?.?.?.?...(.? repeated 60 times) to acheive my requirement and the form is just freezing on me during run time....this example works however if the max limit is around 20 or less...

    ~Sri

  • 08-07-2009 08:37 AM In reply to

    Re: Limit Size of Input in Rich Text Box

    Thanks for this posting, 

    But the only way I got it to work is following this syntax

    .{min,max}

    or 

    .{min,max}$

     

    where 

    min = min number of characters 

    max= max number of characters, 

     

    Good coding everybody.

     

  • 10-29-2010 09:36 AM In reply to

    Re: Limit Size of Input in Rich Text Box

    Hi Greg, In RichTextBox, Can't we limit no of Characters like we have option in TextBox property. If we set limit no of Characters as a 10. we can't enter 11 charter. Same way Is it possible in Richtextbox control. and i have one more requirement. , check the below link in this site , it showing the no of charters while typed in the textbox . http://www.highoncoding.com/Articles/673_Creating_SharpRichTextBox_for_Live_Character_Count_in_WPF.aspx Can u tel me how can we do this ? appreciate to do this help, if send any reference links and code. Thanks mak...!
  • 10-31-2010 11:56 PM In reply to

    Re: Limit Size of Input in Rich Text Box

    Hey Mak,

    You can do it but the problem is that rich text has markup for formatting so 10 chars isn't the same thing as 10 chars since with formatting it will likely be much larger.

    Patrick Halstead
    Project Manager at Qdabra
  • 11-01-2010 02:03 AM In reply to

    Re: Limit Size of Input in Rich Text Box and Display sharepoint lists in a List box control

    hai,

     Thanks for given reply.

    You said, it is possible, can u tel me how to set , means expression or infopath programing....

    In my Form, For SMS Body,  i choose RichTextbox control. So i have limit the characters. 

    2)

    I want to display all sharepoint custom lists in infopath Controls. like listbox.

    Note: Multi selectlistbox control does not support browser enable form,so i choose listbox conrol.

    can u give me idea, how to do programatically..(greate thankful , if u send peice of code )

    thanks
    mansoor

     

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