Limit number of words in the text box - infopath

I am new to Info path, I know how to limit the no.of characters entered in to the text box using string-length function. But is there any way we can limit the number of Words entered in to an multiline text box.
For example a field which is asking to enter 10 words are lesser

Found the answer and wanted to share it
Set a Validation Rule for the field(textbox). In the condition select the "The expression" and type the below condition
string-length(field)-string-length(translate(field," ","")) <10
here field is the name of the textbox. And enter the text in the Screen Tip (Eg: Only lesser than 10 words) and click more option if you want ScreenTip and dialog box message.
For testing in the preview type more then 10 words and hit tab the dialogue box with Only lesser than 10 words will appear

Select the Text Box Properties
In Display tab
Check the check box for Limit the Textbox to: and enter the number for limiting the text box in that
Click OK button
Now the text box will allow only 10 characters alone

Related

Having issues to type text inside a cell text area

I am trying to locate the element and provide my input string but it does not take it.
I am able to click on the element but the input text syntax does not work.
double Click Element ${FN1} -- Working
Input Text ${FN1} Primary Carrier -- Not Working
Set Element Text ${FN1} Primary Carrier -- Not working
Press Keys ${FN1} Mike June -- Not working
Can anyone help how I can get this?

Detecting in MS Access when the user has filled a standard plain or rich text box but kept typing

Is there a way to detect when a user has filled a field completely while they are typing? I've instances of users 'losing data' because they've typed up to the end of the rich (or plain) text (bound or unbound) box and not noticed that the last piece of text they "entered" wasn't saved, so I'd like to pop up a warning when they fill the box.
I've tested, and hitting the end of a text box doesn't trigger any error at all (such as 6 - Overflow). I'm loath to set explicit validation rules on every text box in the application.

Specifying Other Amount on Initial Web Page

I have a form that contains a drop-down selector for someone to choose from one of three items to make a payment. I am trying to add a fourth item so that someone can specify their amount on the initial web page before clicking the "pay with paypal" button I created.
The ID of my text input box for the "other amount" is: amount1
Is it possible to use the advanced variables section of the Paypal button generator to have the value for the amount be set to the value from this text input box.
option_amount3 is the variable name that refers to the fourth option in the drop-down selector, so can I do something like: option_amount3 = [some way to grab the value typed into the text input box]
Here's a link to the page:
http://freeonlinetherapy.net/index_dave.html
Please advise.....

How to get values of dynamic text boxes

How can i get the values of dynamically created text boxes that i have reload every time a user adds a new text box?
Right now what I have is a form with a few text boxes, and an add button, now when the a user clicks add button, it creates another section with a few more text boxes, but now if the user had typed something in one of the text boxes before he clicked add, how can i store that information and make sure it comes back up when the page reloads?
Thank you,

SELENIUM: how to click on a blank section of webpage

I have a search textbox, which has some default text "search your item" visible in it.
Once you click on the search box to enter any word, the default text disappears and the word is typed.
Now, if the word inside the search box is deleted and then you click on any place on the blank part of the page, then the default text appears.
I would like to simulate this using selenium. I am able to delete the word from the search box, but after deleting the word, how do i click on any blank part of the page so that the default text is visible again?
thanks for the help in advance.
Simply use the code:
selenium.FireEvent("//id of the text box","blur");

Resources