Finally got it. I was trying to use the scripts I've seen for the entire form. I didn't know you had to set actions for the form fields.
I'm going to break it down Barney style for the new users (like myself).
- Add a text field to your form
- View the text field's properties
- Under the Options tab, enter the default text that you want to be displayed
- Under the actions tab, select trigger On Focus, select action Run a JavaScript, click Add...
- Paste the following:
// On Focus script:
if (event.target.value==event.target.defaultValue) {
event.target.value = "";
event.target.textColor = color.black;
}
- Under the actions tab, select trigger On Blur, select action Run a JavaScript, click Add...
- Paste the following:
// On Blur script:
if (event.target.value=="") {
event.target.value = event.target.defaultValue;
event.target.textColor = color.ltGray;
}
- Close the properties box
Your fields should now have the default value you set displayed in them. Selecting a text field will "erase" the default value and allow the user to enter their information. Deleting the information will cause the default value to be displayed again.
Thanks for all of the help, guys!