Do you have multiple buttons on the page, each referring to a different 
product, and do you intend them to all go "through" a single modal? You're 
going to need to add some JavaScript to the mix, I imagine. Put a generic form 
in the modal itself, and then use data-attributes or a querystring to "tell" 
the modal which product is being ordered. You'll have to use JS to change the 
form element that signals what product is being ordered. Once you get through 
that, the rest is a normal CRUD Rails form.

Walter

> On Oct 19, 2018, at 9:14 AM, Joe Guerra <jgue...@jginfosys.com> wrote:
> 
> HI, I'd like to insert a bootstrap modal dialog box between my add to cart 
> button and the actual action.
> 
> I know how to display the dialog box, but not sure how to hook it up to the 
> form cart button?  [and the actual saving to cart]
> 
> Any suggestions?
> Thanks,
> Joe
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to rubyonrails-talk+unsubscr...@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/rubyonrails-talk/cc801572-b58e-4408-8678-bab4f90dfdf9%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/4CD81F71-6899-4B91-8111-FEBF0C843A3B%40wdstudio.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to