How to update a form field value after inserting a new value in the lookup table

Hello,

I have a form with a field with is a lookup value of another table.
On the form i have a button with enables the user to insert a new value to the lookup table.

i would like to update the field value when the user has pussed the button and has created a new value. How can i do this?

Regards,

Marco

Re: How to update a form field value after inserting a new value in the lookup table

2 possibilities I can think of:

  • use sc_redir to reload the entire application (make sure data is saved)
  • when inserting lookup value using button, also put the new value in the lookup field using php or javascript (depends on button type)

Re: How to update a form field value after inserting a new value in the lookup table

You could also make an ajax call to get the field and that would also ensure that field was updated properly. This would also save you from having to reload the entire form just to show a new value.

Regards,
Scott.