Ruby on Rails
Saturday, October 20, 2018
No, I have an add to cart button, and I'd like them to confirm their action with a modal dialog box and if yes - save the record to the table, if no- do nothing.
-- [and I can also use the dialog to display some info].
On Saturday, October 20, 2018 at 8:13:08 AM UTC-4, Walter Lee Davis wrote:
On Saturday, October 20, 2018 at 8:13:08 AM UTC-4, Walter Lee Davis wrote:
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 <jgu...@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-ta...@googlegroups.com .
> To post to this group, send email to rubyonra...@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+unsubscribe@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/d097fd73-ef1e-47bb-8da5-b7bd8128f872%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment