yes, that's what I ended up doing. Removed the modal, and used the built-in submit tag confirmation. It will have to do.
On Tue, Oct 23, 2018 at 11:56 AM Walter Lee Davis <wa...@wdstudio.com> wrote: > You could just make the regular button show a confirmation dialog in the > usual Rails way > > data: { confirm: "Are you sure you want to add #{@product.name} to your > cart?" } > > Then there are any number of Bootstrap plug-ins that hijack a normal JS > confirm dialog (which is what the above creates) and style it as a BS > modal. That way your form (including the quantity field) submits normally, > and the Dootstrap part just decorates the result of a confirm() dialog in > JS. > > Walter > > > On Oct 23, 2018, at 11:19 AM, Joe Guerra <jgue...@jginfosys.com> wrote: > > > > > > > > > > > > > > <Capture.PNG> > > > > > > > > > > Ok, this is what I have so far. I've added the bootstrap modal and put > the button right next to the actual button. So, I need to render this > modal, and then on the modal boxes save changes (update the cart). > > oh, the other thing I couldn't figure out is how to get the :qty from > the form input field. I need to check this value compare it to the > remaining as well. > > > > > > Thanks, > > Joe > > > > On Saturday, October 20, 2018 at 2:58:25 PM UTC-4, Greg Navis wrote: > > You can pre-render the modal with a confirmation form. When clicking > "Add to cart" you can update the form with the ID of the product being > added and show the modal. When the user submits the form it'll send the > right product ID to the server. > > > > Best > > Greg > > > > -- > > 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/9326f448-1185-4afa-96c3-e475aa527751%40googlegroups.com > . > > For more options, visit https://groups.google.com/d/optout. > > <Capture.PNG> > > -- > 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/6C95A2CB-9051-47A9-9DF3-2D65E26EF51D%40wdstudio.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/CAOFgAMmnOqyZ2histpQ2QfRG-vLVD%3DLiJ7cPtcwXeEkRuqsE9g%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.