Expand my Community achievements bar.

SOLVED

Clear default value in textbox for data entry

Avatar

Former Community Member

Hello everyone.  I am building an operating agreement form for a client.  Here is a high level picture of the form for discussion purposes:

Operating Agreement (label object for form title)

By signing this document you agree to all of the language stated on the following pages. etc etc etc  (label object for static text)

Client Name     (text object for data entry)

Address           (text object for data entry)

City                (text object for data entry)

State               (text object for data entry)

Article 1 - this agreement is between the client as specified above and the company providing etc etc etc   (label object for static text)

Question 1

Per the client's request, I have removed the label from the Client Name textbox (as well as all other textboxes).  The want me to set the default value of that textbox to say "Client Name" indicating that the Client Name needs to be typed here.  I have added the phrase Client Name to the tool tip rollover help as well.  So we do not burden those filling out the form, I have added a line of JavaScript on the Enter event so the default text in that textbox is removed when the user clicks on the textbox to enter data.  The code I have used is:  this.rawvalue = "";  

This solution works great because we don't want those filling out the form to have to select and delete the default text of "Client Name" when they want to enter data.  So, with the JavaScript in place the default value is removed after clicking in the textbox.  The one problem I have with this solution is that if a person would click in that textbox after entering data or tabs into the textbox after entering data, the data which was entered is removed (due to the code).  Does anyone know of a way to set a default value which erases when the user enters the textbox for data entry, but does not erase what the user types in if they want to add to the data they entered or accidently click in the textbox.

I thought about making the textbox read only after a user enteres data and exits the textbox BUT if they want to modify what they entered they no longer can since it is read only.

Any thoughts on a solution that would meet my requirements?  I don't prefer to have a button on the form that a user clicks to erase the contect of a specific textbox but that is the only other thing I can think of that would work.

Question 2

For label objects like Article 1, I have a need to add a lot of data (over 1 page of text in paragraph format) into a label/textbox.  I assume the best object to copy and paste this data into is a label and not a textbox (which I could remove the formatting and make read only).  My one major requirement for this is that I have expanding text fields preceding this Article 1 which should push (wrap) the Article 1 content onto a second page or third page.  I can set the object property to break but I am not sure if that will drive Article 1 content to partially wrap to a second page.  Will it (is this the correct solution)?  I prefer not to break this lengthy content into numerous label objects for each paragraph but I have done that in the past and it works.

If it matters, my form design has one subform (with the property set to flowed) and every object object embedded into that subform on the hierarchy list (additional subforms, textboxes, labels).  Am I setting this up efficiently and to function as I desired?  I realize it is tough to picture.

Thanks everyone for reading my post and I look forward to any feedback as well as suggestions.

Jeff

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi Jeff,

Here is an example, where the textfield has a null pattern. This can be used to have the caption inside the textfield. As soon as the user clicks inside the textfield, the 'caption' disappears and the textfield is available for the user to type into.

https://acrobat.com/#d=uqcNdyoPayTa2MbPb8F88A

The form has two options. The second replicates the 'caption' at the end in brackets if the field is NOT null.

I'll come back on q2 after a bite to eat... army marches on its stomach

Niall

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Hi Jeff,

Here is an example, where the textfield has a null pattern. This can be used to have the caption inside the textfield. As soon as the user clicks inside the textfield, the 'caption' disappears and the textfield is available for the user to type into.

https://acrobat.com/#d=uqcNdyoPayTa2MbPb8F88A

The form has two options. The second replicates the 'caption' at the end in brackets if the field is NOT null.

I'll come back on q2 after a bite to eat... army marches on its stomach

Niall

Avatar

Level 10

Okay,

If the subform is flowed, you can use a text object (what you are calling a label) and in the Object > Draw palette, you can select 'allow page breaks within content' . This will move the text line-by-line onto the next page as more content is added above.

I think that a text object is better in this context than a textfield object. While you can also set a textfield to allow page breaks, be readOnly and have no border, it is still likely to participate in the tabbing.

Good luck,

Niall