Hi guys!
I have a remote form with hand-made buttons using tags. I'm using data-remote=true in the form tag, but I don't know how to use the link tag to post the form data in a form submit. When I use data-remote with data-method, it creates a remote call with empty parameters, so I doesn't call the submit() function to my form.
My form is:
<form accept-charset="UTF-8" action="/tasks" data-remote="true" method="post">
and my link tag under the form tags are:
it creates a remote call with empty POST parameters:
<a class='minibutton' data-remote='create' href='/tasks/create' data-method='post'>
it doesn't send any POST information, only the header:
<a class='minibutton' data-remote='create' href='/tasks/create'>
How can I call elegant the submit() method of the form? I guess I don't need to create javascript hacks to make it work. Do I?