TextBox Default Value

TextBox Default Value

  
Hi Guys,

Just need help here.

How do I past a default value of a textbox when i load the page?
I passed the value in preparation but it didn't work, what i saw when i did debug. After preparation finishes then it automatically get the values in source record of the Edit Widget and all the values of all my widgets will reset.
Hi Chris,

Welcome to the OutSystems Community! :)

On page load, the inputs are (pre-) filled in with the values of the variables they are bound to. So, if your textbox has Variable set to "MyScreenVariable", not only will that variable have the user-entered value on Submit/postback - it will have provided the textbox with the initial value on page load (after Preparation).

Make sure you assign the default value to MyScreenVariable during Preparation.

Regards,


Miguel
Did work for me too, thanks.
We need to assign the value to the Preparation Query Variable (in my case it was GetTblOrderById.List.Current.tblOrder.OrderYear) not the widget variable (in my case it was TblOrderEdit.Record.tblOrder.OrderYear). My 2 cents.

Regards,

Marios