# Mobile Module Not Clearing text box

**URL:** <https://forum.inductiveautomation.com/t/mobile-module-not-clearing-text-box/9553>\
**Category:** Ignition\
**Created:** [January 15, 2015, 11:41pm UTC](https://forum.inductiveautomation.com/t/mobile-module-not-clearing-text-box/9553 "2015-01-15T23:41:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![WildeKurt](https://avatars.discourse-cdn.com/v4/letter/w/50afbb/32.png) [@WildeKurt](https://forum.inductiveautomation.com/u/WildeKurt)\
**Post date:** [January 15, 2015, 11:41pm UTC](https://forum.inductiveautomation.com/t/mobile-module-not-clearing-text-box/9553/1 "2015-01-15T23:41:54Z")

</div>

I’ve been having a problem with getting an input from a user in a text box and then clearing the it with .text = “”. I get the input just fine but can not clear the box. This works when running the project normally but does not when running it through the mobile module.

I’ve tried this in the keyPressed and keyReleased events for the text box:

```auto
def clearInput(obj = event.source):
	obj.text = ""

if event.keyCode == event.VK_ENTER or event.keyCode == 13 :
	event.source.parent.parent.getComponent('Table').setValue(event.source.parent.parent.StepIndex,"Scanned Value",event.source.text)
	event.source.parent.parent.StepIndex += 1
	project.steelReceiving.stepControl(system.gui.getParentWindow(event))
	system.util.invokeLater(clearInput)
```

I’ve also tried it without the invoke later part and just setting it to “”. No difference. Any ideas?

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [January 16, 2015, 12:07am UTC](https://forum.inductiveautomation.com/t/mobile-module-not-clearing-text-box/9553/2 "2015-01-16T00:07:20Z")

</div>

I think the problem here is as simple as the fact that the mobile popup keyboard doesn’t have an “enter” key. So you’re never getting that key press event, because the keyboard doesn’t even have that key.

We already have a ticket in the system to get this fixed, should be in 7.7.4

---

<div class="post-metadata">

**Author:** ![WildeKurt](https://avatars.discourse-cdn.com/v4/letter/w/50afbb/32.png) [@WildeKurt](https://forum.inductiveautomation.com/u/WildeKurt)\
**Post date:** [January 16, 2015, 2:56pm UTC](https://forum.inductiveautomation.com/t/mobile-module-not-clearing-text-box/9553/3 "2015-01-16T14:56:52Z")

</div>

The code in the text box works all except the part that sets it’s text property. I’m not using the mobile keyboard but the device’s. The device is a mobile computer/bar code scanner and everything works fine if I use the bar code reader for input just not the keyboard.

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [January 16, 2015, 5:39pm UTC](https://forum.inductiveautomation.com/t/mobile-module-not-clearing-text-box/9553/4 "2015-01-16T17:39:53Z")

</div>

Oh, I see. So, the clearInput function runs, but it doesn’t work? Have you verified that it’s running via a printout or something? The client output is hard to find with mobile, maybe write to a tag or something else to verify?

---

<div class="post-metadata">

**Author:** ![WildeKurt](https://avatars.discourse-cdn.com/v4/letter/w/50afbb/32.png) [@WildeKurt](https://forum.inductiveautomation.com/u/WildeKurt)\
**Post date:** [January 16, 2015, 6:11pm UTC](https://forum.inductiveautomation.com/t/mobile-module-not-clearing-text-box/9553/5 "2015-01-16T18:11:40Z")

</div>

I put a message box in the clearInput function and that pops up. I don’t think that function is even necessary as it doesn’t work with it or without. All the other script is working fine.

---

<div class="post-metadata">

**Author:** ![magno32](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/magno32/32/3402_2.png) [@magno32](https://forum.inductiveautomation.com/u/magno32)\
**Post date:** [April 27, 2017, 5:01pm UTC](https://forum.inductiveautomation.com/t/mobile-module-not-clearing-text-box/9553/6 "2017-04-27T17:01:42Z")

</div>

Was there any resolution for this?

I am seeing the same behavior in 7.9.2

If I show a dialog before attempting to clear the text, the text will clear after the dialog is dismissed… But the text does not clear if we skip the dialog.
