Remote function not submitting form

Hi all,

I have this code:

<%= collection_select('declarations_payers', 'user', @users, 'id',

‘fullname’, {},
{:onChange => remote_function(
:update => “participants”,
:url => { :controller => ‘ajax’,
:action => ‘declaration_users’ }
)
}
) %>

It’s inside a div, inside a form generated with form_tag.

But when I change the item of the selectlist, it doesn’t submit the
form data. Does anyone know what’s the problem?
Or maybe how I can solve this problem. I tried the serialize()
function, but that can only be used for one field.

Thanks in advance!

Leon B. wrote:

Hi all,

I have this code:

<%= collection_select('declarations_payers', 'user', @users, 'id',

‘fullname’, {},
{:onChange => remote_function(
:update => “participants”,
:url => { :controller => ‘ajax’,
:action => ‘declaration_users’ }
)
}
) %>

It’s inside a div, inside a form generated with form_tag.

But when I change the item of the selectlist, it doesn’t submit the
form data. Does anyone know what’s the problem?
Or maybe how I can solve this problem. I tried the serialize()
function, but that can only be used for one field.

Thanks in advance!

I tried the :submit argument, but that requires the use of a form with
an id.
How can I used the default method form_tag and add an :id to that? I
can’t get that working.