Number of characters left - InfoPath Dev
in

InfoPath Dev

Number of characters left

Last post 05-18-2007 04:57 AM by B.Shiva Prasad. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 05-18-2007 02:32 AM

    Number of characters left

    We are developing forms in infopath 2007. One of requirement says that a textbox should be limited to 40 characters and a message should be displayed about the number of characters that are left to be utilized in that textbox. I am not sure how to go about this approach, because as far as my knowledge goes we cannot use javascript in Infopath 2007 and since Infopath involves xml stuff, we cannot get any direct reference of the textbox.

    Can anyone give me an idea or a workaround to implemet this?

    -bhavana bhat

  • 05-18-2007 04:57 AM In reply to

    Re: Number of characters left

    Hi Bhavana,

    Welcome to the InfoPath forums, It is possible double click on the text box and select the display tab and check "Limit text box to" and give 40 characters and in the Data tab click Rules -> Add -> Set condition and in the first drop down select "the expression" and in the corresponding text box type string-length(.) < 40 and click ok.

    Now click "Add Action" and select "Show a dialog box expression" in the Action drop down and in the expression text box make this statement concat(40 - string-length(.), " Characters can enter"). and click ok 4 times. you will get the result.

    And In InfoPath 2007 we can use JScript, for that

    select Tools -> Form options -> Programming in that select JScript where "Form template code language" and click ok.

     

    Hope this will help you.

     

    B.Shiva Prasad
    InfoPath Dev,
    http://www.ggktech.com
    India
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.