Probably a whole lot easier if you just have a checkbox indicating if
the ship is the same as the bill_to. Pretty common to do that less
hassle.
On Jul 3, 9:12 am, Marnen Laibow-Koser <li...@ruby-forum.com> wrote:
> InventoryTrackers wrote:
> > We've all seen the checkout forms with Bill To: and Ship To: I'd like
> > to have a button that says "Ship to Bill To:" and if we click it, it
> > copies all the Ship To: fields across such as phone, email, etc.
> > I've been looking at link_to_function, is that the right path?
>
> Probably. The JavaScript for this should be very simple to write. If I
> were you, though, I wouldn't use link_to_function unless you're already
> on Rails 3: Rails 2's JS helpers mix JS into your HTML, where it really
> doesn't belong.
>
> > I've done observe_fields before but that went to a controller action
> > whereas here we could get by just copying params[field_values].
> > Thanks,
> > David
>
> --
> Posted viahttp://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment