Affect value to input text widget on ontextchange other input text widget

I would like to be able to assign a calculated value in my input text 2 from the onchangetext of my input text 1 … I don’t really have the js skills to do this by myself


Hey! You can do this by using the appsmith store :slight_smile:

In your Input1 onTextChanged box, select storeValue from the dropdown. Make the name myValue and in the value field you perform your calculation. This will store your calculated value in the appsmith store.

In your Input2 default text property, write something like {{}}.

If your calculation is more than one line of code it might be a good idea to make a function that performs the calculation. You can then call this function in the storeValue value field for Input1 and pass Input1.text as a parameter.

We have a video on our YouTube channel here showing how to dynamically update widget properties :slight_smile:

@fporta33 you can simply bind the defaultText of Input1 to {{Input2.text}} :slight_smile:

storeValue work find in my case