I have an ajax form with select and options, on submit new information is appended into a div.

i also need to update the select list in the form on submit (or update the whole select form itself)
so basically i need to do two ajax queries on one form 'submit'
how should i do this?


rfay’s picture

You can return an array of AJAX commands from an AJAX forms callback, instead of just returning part of the form.

The Examples Module AJAX Example, AJAX Commands example, shows how to use AJAX commands.