Input Widget Set Text via JS

How can I set the value of an Imput widget via JavaScript?
Like for example Imput1.text = ‘Test Text’.

@umi Its not possible to do this programmatically today. We have an open issue to track this feature here - [Feature]-[4968]:Add functions to set meta properties programatically on widgets · Issue #3532 · appsmithorg/appsmith · GitHub

You can save the value to appsmith store - storeValue('varname','Test Text') and then bind the value from the store - (appsmith.store.varname) to the Input widget’s Default Text property

More info on store here - Store Value - Appsmith

If I bind the following to the imput :
{{ appsmith.store.AKT_LAUF_ID[0] }}

it says the following
{ “NEXTVAL”: 279460 }

and can I trigger the value?

Also, how do I reset my imput widget so that it always contains the current value?

@umi You can do {{ appsmith.store.AKT_LAUF_ID[0].NEXTVAL }} to get the value. This should work :smiley:

We have a function available called resetWidget() but you can also try setting the default value from the appsmith store as well.

I hope this helps!