Forum: Ruby on Rails Custom Form Buttons

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
A111108ed3617edc35da89e84689c3c2?d=identicon&s=25 Arch Stanton (d6veteran)
on 2006-04-19 06:55
Is there a way to deliver options for a custom form button to the submit
function?

As in:

<input type="image" name="submit" src="image.jpg" width="126"
height="18">
B0be4bfef5a22697a0f44f4fe295aaef?d=identicon&s=25 James Whittaker (aftershock)
on 2006-04-19 11:39
Arch Stanton wrote:
> Is there a way to deliver options for a custom form button to the submit
> function?
>
> As in:
>
> <input type="image" name="submit" src="image.jpg" width="126"
> height="18">

Best advice is to read the RDoc that comes with rails. It has lots of
examples and is very easy to read. In case you do not know how to run
it. Bring up your command prompt and enter:

gem_server

This will start a webrick server session, now point your web browser to
http://0.0.0.0:8808 (or http://localhost:8808) this will now be shoing
the RDoc for the gems you have on your system. If you look into the
latest version of the actionpack (that contains the actionview) you will
see a list of methods on the right.

The bit you are interested in is here:
http://localhost:8808/doc_root/actionpack-1.12.0/r...

Hope this helps.

By looking and understanding the RDocs you can save yourself some time
and learn more about the way rails works.

I'm no expert but it has really helped me.

enjoy the rails...
A111108ed3617edc35da89e84689c3c2?d=identicon&s=25 Arch Stanton (d6veteran)
on 2006-04-19 18:12
James Whittaker wrote:

> The bit you are interested in is here:
> 
http://localhost:8808/doc_root/actionpack-1.12.0/r...
>
> Hope this helps.
>
> By looking and understanding the RDocs you can save yourself some time
> and learn more about the way rails works.
>
> I'm no expert but it has really helped me.
>
> enjoy the rails...

Ya I am using the docs.  I find them confusing as it is hard to find
what you want.  For example I've been looking at the submit calls . . .
I see now after looking at the UrlHelper page that I can pass in html
options.  However the problem is knowing which method you need to use.
All the methods for form submission should be categorized as such on a
single page.
A111108ed3617edc35da89e84689c3c2?d=identicon&s=25 Arch Stanton (d6veteran)
on 2006-04-19 18:16
Here's a good example.  I want to use an asynchronous call, using
to_remote, but there is no button_to_remote.  So can I pass html options
to any linking method?
This topic is locked and can not be replied to.