Hi,
I have already created a form for text to be entered. Now I am trying to tweak it to when a field is completed the text is changed to Upper Case. I can't seem to find or get to the Text Field Properties dialog to enter the action. Can someone take my throught the steps.
Frank
It sounds like you want the text entered into that field to be converted to all upper case when the user finishes entering text (usually by clicking on the next field or some other part of the screen).
One way to achieve this is to edit the properties of the text field you created (select the "Select Object" tool, which looks like a blue arrow on the Advanced Editing toolbar in Acrobat 8, then click on the field you created to select the field and then right click (in Windows) to get the options, then select Properties, which is at the bottom of the list).
The window that opens will have seven tabs, under the first tab "General", you will see the name for the field that you are working on. You need the correct name to make the next step work. In the code below, I will assume the name is Text1.
After you have the field's name, you then click on the Actions tab. You select the trigger "On Blur" in the first drop down and then select "Run a JavaScript" in the second drop down. You then click on the "Add" button. This will open up a JavaScript panel, where you type the following:
var strText = this.getField("Text1").value ;
strText = strText.toUpperCase() ;
this.getField("Text1").value = strText ;
You will, of course, need to replace "Text1" with the appropriate field name, but this should work.
You could do this all in one line by typing:
this.getField("Text1").value = this.getField("Text1").value.toUpperCase();
but I have found that when you are starting with JavaScript, it is often easier to break complex steps down to get the functionality working and do the shorter versions when/if you get it working. The longer version is easier to debug if you happen to make a typo somewhere.
I hope that helps.
---Andrew