# Text input values don't seem to be working

**URL:** <https://discourse.processing.org/t/text-input-values-dont-seem-to-be-working/18337>\
**Category:** Coding Questions\
**Created:** [March 3, 2020, 4:56am UTC](https://discourse.processing.org/t/text-input-values-dont-seem-to-be-working/18337 "2020-03-03T04:56:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pixelfixation](https://avatars.discourse-cdn.com/v4/letter/p/9de053/32.png) [@Pixelfixation](https://discourse.processing.org/u/Pixelfixation)\
**Post date:** [March 3, 2020, 4:56am UTC](https://discourse.processing.org/t/text-input-values-dont-seem-to-be-working/18337/1 "2020-03-03T04:56:47Z")

</div>

I have this sketch I have been working on.

[https://editor.p5js.org/pixelfixation/sketches/o8UMGxdk](https://editor.p5js.org/pixelfixation/sketches/o8UMGxdk)

I am working on the input boxes under the sketch. On lines 81-88 i am setting up the inputs and on 118 thru 133 i am working with the inputs. When i enter new numbers into the text boxes the value doesn’t seem to change.

Any ideas what is going on?

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [March 3, 2020, 11:27am UTC](https://discourse.processing.org/t/text-input-values-dont-seem-to-be-working/18337/2 "2020-03-03T11:27:36Z")

</div>

Are we sure about these lines

`wheel_1_R_input.value = 180;` ?

---

<div class="post-metadata">

**Author:** ![Pixelfixation](https://avatars.discourse-cdn.com/v4/letter/p/9de053/32.png) [@Pixelfixation](https://discourse.processing.org/u/Pixelfixation)\
**Post date:** [March 3, 2020, 2:22pm UTC](https://discourse.processing.org/t/text-input-values-dont-seem-to-be-working/18337/3 "2020-03-03T14:22:03Z")

</div>

Without them the sketch won’t run. I have no idea why. 🙁

---

<div class="post-metadata">

**Author:** ![Pixelfixation](https://avatars.discourse-cdn.com/v4/letter/p/9de053/32.png) [@Pixelfixation](https://discourse.processing.org/u/Pixelfixation)\
**Post date:** [March 3, 2020, 2:55pm UTC](https://discourse.processing.org/t/text-input-values-dont-seem-to-be-working/18337/4 "2020-03-03T14:55:34Z")

</div>

It also doesn’t seem to matter if I cast them as an int or a float.

---

<div class="post-metadata">

**Author:** ![Pixelfixation](https://avatars.discourse-cdn.com/v4/letter/p/9de053/32.png) [@Pixelfixation](https://discourse.processing.org/u/Pixelfixation)\
**Post date:** [March 3, 2020, 3:14pm UTC](https://discourse.processing.org/t/text-input-values-dont-seem-to-be-working/18337/5 "2020-03-03T15:14:10Z")

</div>

Figured it out. Turns out you can’t cast the value of the float at the same time as getting the value.

```auto
wheel_1_R_input = createInput('180');
let w1r = wheel_1_R_input.value();
w1r = float(w1r);

```

not

```auto
wheel_1_R_input = createInput('180');
let w1r = float(wheel_1_R_input.value());

```

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [March 6, 2020, 6:09pm UTC](https://discourse.processing.org/t/text-input-values-dont-seem-to-be-working/18337/6 "2020-03-06T18:09:52Z")

</div>

That doesn’t look right. This:

```auto
let b = a.value();
b = float(b);

```

should be the same as:

```auto
let b = float(a.value());

```

They are the same.
