How to refresh a form without reset fields

I have a form to insert record.
Some fields are select from a table. When the data in the tables are updated , the user needs to refresh the form to have the ability of select the new values.
I created a PHP button which calls the sc_exit(ref).
Problem is that when the form is refreshed (or the user press F5 in the browser), the fields are reset to empty.
Is there a way to refresh the form keeping the selected values ?

Thanks.
Federico

One way that I know of is to use variables. In this case I’d say local variables for the application. You could set Attributes under Programming to do this. Once you add the attribute to the form you can use code in onapplicationinit Event to set the initial value and type of the variable. Then before you do a refresh you can capture all of the form field values to the variables.

I hope this helps.

Other option is to add it to your session and then retrieve it. Looks a lot like the solution above.

For this purpose people built angular and react.
I think sc should at least try make fields more dynamic and updatable from php. I do not think you can access field select list from php.

JaunLuke, sorry for being so late in reply. I am going to try your solution, I hope to be able to do it :slight_smile: