How to refresh a field in form?

Let’s say I have a form with 2 fields - first is Ajax Text Auto-Complete and second simple Text.
The content of the second Text field depends (there’s an SQL query in it) of what is choosen in the first one.

Now I can’t find a way to refresh this field.

I don’t wat to use Select type for first field as users have fount it difficult.

It would be acceptable if I had a button “refresh”. But I don’t know how to make it work as sc_ajax_refresh(); do not work…

Hi,
first of all, sc_ajax_refresh() can’t work in a form because it is for grid only.

Updating the text field can be handled by an your_field_onChange AjaxEvent.

{text_field} = “what ever you want to be there”;

Although it’s not quite clear what you mean with (there’s an SQL query in it).

jsb

Actually I’ve found much simpler method of refreshing.
When you just put a submit button anywhere in the form when you click it the form is refreshed.

{a_label_field} = '<input type="submit" value="refresh" />';