How get the value of TextInput ?

Hi, I have two TextInput :

<TextInput ux:Name="usernameTI" Row="0" Column="1" TextAlignment="Left" PlaceholderText="Usuario" Opacity=".3" PlaceholderColor="#000" Value="{user}" />

<TextInput ux:Name="passwordTI" Row="1" Column="1" TextAlignment="Left" PlaceholderText="Password" Opacity=".3" PlaceholderColor="#000" Value="{password}" />

I try pass the value to an variable :

var Observable = require('FuseJS/Observable');
var user = Observable();
var password = Observable();
var body = Observable();
body = {
  "user": user,
  "password": password

module.exports = {
    user: user,
    password: password,

But with debug_log(body); I get this:


I can`t get the value of this TextInput. Can you help me?

An observable is an object with several properties. To get the value of an observable you need to access the ‘value’ property of the observable you want.

var myVar = Observable("some value");
var otherVar = myVar.value;

What you do in your code is override the body observable to an normal object
if you want your body variable to remain an observable you shoud do this:

body.value  = {
  "user": user.value,
  "password": password.value

It`s works. Thanks for you answer :slight_smile: