# Question on newInput and using setText / getText

**URL:** <https://forums.solar2d.com/t/question-on-newinput-and-using-settext-gettext/327588>\
**Category:** Particle Candy / Text Candy\
**Created:** [August 5, 2014, 6:43pm UTC](https://forums.solar2d.com/t/question-on-newinput-and-using-settext-gettext/327588 "2014-08-05T18:43:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![WarrenW](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/w/e5b9ba/32.png) [@WarrenW](https://forums.solar2d.com/u/WarrenW)\
**Post date:** [August 5, 2014, 6:43pm UTC](https://forums.solar2d.com/t/question-on-newinput-and-using-settext-gettext/327588/1 "2014-08-05T18:43:14Z")

</div>

Below is code example from their site using the newInput widget. How do I use the setText and getText? I tried using the name as the object like MyWidget:setText(“testing”) and it fails saying MyWidet is nil.

Also, when using setText does the text show or only the caption still? The caption is like a hint text which is nice but if you set test to the widget I would hope it shows instead.

Thanks,

Warren

```
-- REQUIRE THE LIBRARY \_G.GUI = require("widget\_candy") -- CREATE THE WIDGET \_G.GUI.NewInput( { x = "center", y = "center", width = "70%", theme = "MyTheme1", name = "MyWidget", caption = "Enter Your Name...", notEmpty = true, textColor = {20,40,20}, inputType = "default", -- "number" | "password" | "default" allowedChars = "ABCabc1234567890.!?", quitCaption = "Tap screen to finish text input.", onChange = function(EventData) print(EventData.value) end, onBlur = function(EventData) print(EventData.value) end, [any other properties...] } )
```

---

<div class="post-metadata">

**Author:** ![WarrenW](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/w/e5b9ba/32.png) [@WarrenW](https://forums.solar2d.com/u/WarrenW)\
**Post date:** [August 8, 2014, 11:34pm UTC](https://forums.solar2d.com/t/question-on-newinput-and-using-settext-gettext/327588/2 "2014-08-08T23:34:59Z")

</div>

I have emailed their support and no replies at all. I have read where other people do not get replies either. I wish I had known this before I spent money on controls that I can’t get support for…

Warren

---

<div class="post-metadata">

**Author:** ![WarrenW](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/w/e5b9ba/32.png) [@WarrenW](https://forums.solar2d.com/u/WarrenW)\
**Post date:** [August 8, 2014, 11:34pm UTC](https://forums.solar2d.com/t/question-on-newinput-and-using-settext-gettext/327588/3 "2014-08-08T23:34:59Z")

</div>

I have emailed their support and no replies at all. I have read where other people do not get replies either. I wish I had known this before I spent money on controls that I can’t get support for…

Warren
