# Form field value and no value

**URL:** <https://forum.kirupa.com/t/form-field-value-and-no-value/30168>\
**Category:** Uncategorized\
**Created:** [September 4, 2003, 5:40pm UTC](https://forum.kirupa.com/t/form-field-value-and-no-value/30168 "2003-09-04T17:40:00Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![DDD](https://avatars.discourse-cdn.com/v4/letter/d/9fc348/32.png) [@DDD](https://forum.kirupa.com/u/DDD)\
**Post date:** [September 4, 2003, 5:40pm UTC](https://forum.kirupa.com/t/form-field-value-and-no-value/30168/1 "2003-09-04T17:40:00Z")

</div>

How can I do this in flash. You know how in html forms you can do this:

```php
onblur="this.value='enter email address';" onfocus="this.value='';"

```

What I have are some form fields that have some text in it as a defalut value then when the person sets focus in the form field the value disappears. Now if the place a value in the form field then move to the next form field thus losing focus on the first form field. I would like the info they input in there to remain there. But if nothing was placed show the default value. I know how to do it in html but not in flash. Pleez help. Would love to do some flash forms.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 4, 2003, 6:10pm UTC](https://forum.kirupa.com/t/form-field-value-and-no-value/30168/2 "2003-09-04T18:10:41Z")

</div>

I’m not sure if I understand you correctly. Are you saying that by default the text boxes have text in them that explain what to fill in that particular text box; and then it disappears when the user sets focus to it?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 4, 2003, 6:14pm UTC](https://forum.kirupa.com/t/form-field-value-and-no-value/30168/3 "2003-09-04T18:14:22Z")

</div>

yes…but when the user fills in the box I do not want their text to be replaced with the default text. I know my explanation is weird sorry

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 4, 2003, 6:43pm UTC](https://forum.kirupa.com/t/form-field-value-and-no-value/30168/4 "2003-09-04T18:43:18Z")

</div>

Humm, this may not be what you’re looking for but this is what I do sometimes when I want something quick. Within Input text boxes you can still type in it. When you play the movie, that text shows up by default and the user can just tab to it (use tabIndex order function) and delete what is written by default with whatever it is they are typing. Even if they skip some of the input text boxes you have, the default text in the box doesn’t get sent when they hit the submit button.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 4, 2003, 6:58pm UTC](https://forum.kirupa.com/t/form-field-value-and-no-value/30168/5 "2003-09-04T18:58:08Z")

</div>

yeah but I was hoping for some sort of onfocus event like in html…I am not sure if this is even possible in flash. But one of the flash Gods here will hopefully be able to help me!!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 4, 2003, 7:04pm UTC](https://forum.kirupa.com/t/form-field-value-and-no-value/30168/6 "2003-09-04T19:04:06Z")

</div>

Let me know when the Gods answer. :beam:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 4, 2003, 7:53pm UTC](https://forum.kirupa.com/t/form-field-value-and-no-value/30168/7 "2003-09-04T19:53:56Z")

</div>

::bump::…had to bump this it is important

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 4, 2003, 8:11pm UTC](https://forum.kirupa.com/t/form-field-value-and-no-value/30168/8 "2003-09-04T20:11:25Z")

</div>

Hi,

text fields have an onSetFocus event why don’t you look at that?

Liz

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 4, 2003, 8:18pm UTC](https://forum.kirupa.com/t/form-field-value-and-no-value/30168/9 "2003-09-04T20:18:59Z")

</div>

did not know of the onSetFocus. But I will now. Sorry they rarely let me out of Drawing and Design. My AS is weak. If anyone has a code snippet I can play with I would greatly appreciate it.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 4, 2003, 8:25pm UTC](https://forum.kirupa.com/t/form-field-value-and-no-value/30168/10 "2003-09-04T20:25:10Z")

</div>

Humm, interesting. I’m busy at work but I definitely wanna try this. I’ll see if I can get you a snippet by tomorrow.
