# Input box that needs input

**URL:** <https://forum.kirupa.com/t/input-box-that-needs-input/117796>\
**Category:** Uncategorized\
**Created:** [July 30, 2004, 11:09am UTC](https://forum.kirupa.com/t/input-box-that-needs-input/117796 "2004-07-30T11:09:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![spenceclone](https://avatars.discourse-cdn.com/v4/letter/s/f475e1/32.png) [@spenceclone](https://forum.kirupa.com/u/spenceclone)\
**Post date:** [July 30, 2004, 11:09am UTC](https://forum.kirupa.com/t/input-box-that-needs-input/117796/1 "2004-07-30T11:09:43Z")

</div>

Hi,

Im doing a movie that contains an input box what i’m looking for is a way of adding an answer button that will only reveal the answer if there is and input in the input box?

Thanks

Spence

---

<div class="post-metadata">

**Author:** ![ViNc3](https://avatars.discourse-cdn.com/v4/letter/v/b487fb/32.png) [@ViNc3](https://forum.kirupa.com/u/ViNc3)\
**Post date:** [July 30, 2004, 11:32am UTC](https://forum.kirupa.com/t/input-box-that-needs-input/117796/2 "2004-07-30T11:32:52Z")

</div>

Put this on your button:

```php
 
on (release) {
	 if (inputBox == "Answer" or inputBox == "answer") {
		 //if answer is right
		 text = "CORRECT!";		
	 } else if (inputBox == "") {
		 //if there's no input
		 text = "Please enter an answer"
	 } else {
		 //if answer is wrong
		 text = "Wrong!"
	 }
}
 

```

hope it helps…and hope it’s right too

EDIT: I REACHED MY 100 POSTS MARK 😛

---

<div class="post-metadata">

**Author:** ![spenceclone](https://avatars.discourse-cdn.com/v4/letter/s/f475e1/32.png) [@spenceclone](https://forum.kirupa.com/u/spenceclone)\
**Post date:** [July 30, 2004, 1:39pm UTC](https://forum.kirupa.com/t/input-box-that-needs-input/117796/3 "2004-07-30T13:39:43Z")

</div>

Thanks that’s great :}
