default text replaced with user entered info.

Avatar

Avatar
Level 1
_Mel_bush_
Level 1

Likes

0 likes

Total Posts

3 posts

Correct reply

0 solutions
View profile

Avatar
Level 1
_Mel_bush_
Level 1

Likes

0 likes

Total Posts

3 posts

Correct reply

0 solutions
View profile
_Mel_bush_
Level 1

19-03-2009

I have searched all over to see how this is done. I found one other response to this question, but it was not complete.



Basically what I am wondering is, how do I set up my text field so that there is a default text to signify what the user should type into the box. When the user clicks the text field, this default is removed so they can begin typing.



Thank you!

Replies

Avatar

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

19-03-2009

You can enter your default text into the field by loading it in Designer, highlighting the field and entering the text you want into the Deafult area under the Object/Value palette. Now in the script editor under the Enter event you can add this javascript code:



this.rawValue = "";



Be aware that if the user goes back into that field at a later time then the value they previously entered will disappear as well.



A more better way woudl be to see if the field value was the same as the dafault and if it was then clear it. Assuming the default text was "Please enter data here!", you could write javacript code like something like this:



if (this.rawValue == "Please enter data here!"){

this.rawValue = "";

}



With this technique you will not overwrite anything they previously entered.



Make sense?

Avatar

Avatar
Level 1
_Mel_bush_
Level 1

Likes

0 likes

Total Posts

3 posts

Correct reply

0 solutions
View profile

Avatar
Level 1
_Mel_bush_
Level 1

Likes

0 likes

Total Posts

3 posts

Correct reply

0 solutions
View profile
_Mel_bush_
Level 1

19-03-2009

Thank you so incredibly much! You really, really helped me!!!!!!!!!!!! It worked perfectly.

Avatar

Avatar
Validate 10
Level 2
tltagami
Level 2

Likes

2 likes

Total Posts

88 posts

Correct reply

0 solutions
Top badges earned
Validate 10
Validate 1
Boost 1
View profile

Avatar
Validate 10
Level 2
tltagami
Level 2

Likes

2 likes

Total Posts

88 posts

Correct reply

0 solutions
Top badges earned
Validate 10
Validate 1
Boost 1
View profile
tltagami
Level 2

05-10-2009

I'm a newbie at this and not very experienced with Javascript. I tried to add this code to the script editor for a field, but I am getting a script error. I made sure the default language was Java in Properties. Could you please expand this step by step with everything I need to put in the editor box?

Thanks!

Avatar

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

05-10-2009

It woudl be easier to see hwat you have done and suggest ways of correcting it.

Also coudl you expand on what you are trying to do?

Paul

Avatar

Avatar
Validate 10
Level 2
tltagami
Level 2

Likes

2 likes

Total Posts

88 posts

Correct reply

0 solutions
Top badges earned
Validate 10
Validate 1
Boost 1
View profile

Avatar
Validate 10
Level 2
tltagami
Level 2

Likes

2 likes

Total Posts

88 posts

Correct reply

0 solutions
Top badges earned
Validate 10
Validate 1
Boost 1
View profile
tltagami
Level 2

05-10-2009

Actually, just after I posted this, I figured it out. But thank you for the speedy reply!