# Getting value of text field?

**URL:** <https://forum.servoy.com/t/getting-value-of-text-field/15974>\
**Category:** Classic Servoy\
**Created:** [May 29, 2012, 6:43pm UTC](https://forum.servoy.com/t/getting-value-of-text-field/15974 "2012-05-29T18:43:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![volcodc](https://avatars.discourse-cdn.com/v4/letter/v/ea5d25/32.png) [@volcodc](https://forum.servoy.com/u/volcodc)\
**Post date:** [May 29, 2012, 6:43pm UTC](https://forum.servoy.com/t/getting-value-of-text-field/15974/1 "2012-05-29T18:43:37Z")

</div>

Hello,

I’m not sure if I am skipping something in the Servoy Documentation, but I cannot seem to find a way to get the current value of a text field.  
I have looked at all the methods and properties for JSField, but none seem to specify returning the current value.

I am creating a login form, so of course I need a way to pull in the typed username and password so I can run validation on them via the database.  
In standard JS it was just .value, what am I missing?

Thanks,  
Chris

---

<div class="post-metadata">

**Author:** ![ptalbot](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/ptalbot/32/4952_2.png) [@ptalbot](https://forum.servoy.com/u/ptalbot)\
**Post date:** [May 29, 2012, 6:46pm UTC](https://forum.servoy.com/t/getting-value-of-text-field/15974/2 "2012-05-29T18:46:34Z")

</div>

Fields in Servoy needs to be attached to a data provider.  
It can be a database column, a global (or scoped variable in 6.1), or a form variable.

Simply create a var username and var password in your login form’s js.  
Then attach these variables to the fields as dataProvider, then you can simply use the value of the variable.

That’s how it is done in Servoy.

---

<div class="post-metadata">

**Author:** ![volcodc](https://avatars.discourse-cdn.com/v4/letter/v/ea5d25/32.png) [@volcodc](https://forum.servoy.com/u/volcodc)\
**Post date:** [May 29, 2012, 6:49pm UTC](https://forum.servoy.com/t/getting-value-of-text-field/15974/3 "2012-05-29T18:49:35Z")

</div>

Cool, thanks for the quick reply!  
I’ll go ahead and start mucking with dataproviders then!
