Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1106571
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T01:48:49+00:00 2026-05-17T01:48:49+00:00

I have a remote form with hand-made buttons using tags. I’m using data-remote=true in

  • 0

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 don’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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T01:48:50+00:00Added an answer on May 17, 2026 at 1:48 am

    I guess there’re 2 ways you can solve it:

    1.
    I see you’re using a class called ‘minibutton’ on your link, which suggests you want it to look like a button anyway. So instead of the link (or <input type="submit"> tag), use the button tag inside your form:

    <button type="submit" value="Submit">
    

    and style it to your liking using CSS. You can even use icons on them. Check out this blog post for details and a ready to use chunk of CSS code.

    2.
    If you still want to use the link, you can set “id” attributes on the link and on the form, and add a click event observer to submit the form.
    Assuming you’re using Prototype, put something like this into the head part of the page:

    <%= javascript_tag do %>
        $('YOUR-LINK-ID').observe(
            'click', 
            function(el, value) {
              $('YOUR-FORM-ID').request({
                onSuccess: function(response) {eval(response)}
              })
            }
        );
    <% end %>
    

    This is assuming your response content type is text/javascript. If it’s not, you’d have to use the onSuccess and/or onComplete callbacks to replace a piece of your page with the response contents.

    See documentation on Form.request and Event.observe for details on observing and submitting a form.

    This question may also be helpful.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a silly question. I'm stuck on that and i don't know how
I have worked on two projects using Ajax and Ruby. In one project, I
I have a modal dialog (done through jquery UI) that submit a form to
I managed to do almost all the way towards happiness with my custom form
I have a RoR app running rails 2.3.8 which makes use of the Rails
I have been struggling with this jQuery Validation Plugin. Here is the code: <script
I have a _form.html.erb partial that comes from the standard rails 3 template for
Our workflow currently has developers working on locally hosted copies of our web application
Link to the site in question . You can look at the source for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.