How could I ask a user to confirm specific form input? EX: <%= f.submit ''Donate'', :confirm => ''Confirm your donation amount: ###amount###'' %> Where the ###amount### would be replaced with the amount entered in the form. Thanks, Dustin -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=.
Typically you would place the confirmation on the form, not an input field. Is there a reason the confirmation on the form would not work? Darian Shimy -- http://www.darianshimy.com http://twitter.com/dshimy On Fri, Nov 20, 2009 at 11:14 AM, Dustin <pixellace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> How could I ask a user to confirm specific form input? > > EX: > > <%= f.submit ''Donate'', :confirm => ''Confirm your donation amount: > ###amount###'' %> > > Where the ###amount### would be replaced with the amount entered in > the form. > > Thanks, > Dustin > > -- > > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=. > > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=.
Thanks for the reply. The confirmation is on the submit button. The confirmation works on submit but I wasn''t sure if you could add something more to the confirmation besides static text such as "Are you sure you want to delete?" I would like it if I could display a value in the confirmation. So when a user finally submits the form it would confirm a value they entered in a text box above. Does that make sense? DB On Nov 20, 2:25 pm, Darian Shimy <dsh...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Typically you would place the confirmation on the form, not an input > field. Is there a reason the confirmation on the form would not work? > > Darian Shimy > --http://www.darianshimy.comhttp://twitter.com/dshimy > > > > On Fri, Nov 20, 2009 at 11:14 AM, Dustin <pixell...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > How could I ask a user to confirm specific form input? > > > EX: > > > <%= f.submit ''Donate'', :confirm => ''Confirm your donation amount: > > ###amount###'' %> > > > Where the ###amount### would be replaced with the amount entered in > > the form. > > > Thanks, > > Dustin > > > -- > > > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=.-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 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=.
Yes. The only way I''m aware of is to use the :onclick and access the value with javascript (this.form....). Darian Shimy -- http://www.darianshimy.com http://twitter.com/dshimy On Fri, Nov 20, 2009 at 11:47 AM, Dustin <pixellace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Thanks for the reply. > > The confirmation is on the submit button. The confirmation works on > submit but I wasn''t sure if you could add something more to the > confirmation besides static text such as "Are you sure you want to > delete?" I would like it if I could display a value in the > confirmation. So when a user finally submits the form it would confirm > a value they entered in a text box above. > > Does that make sense? > > DB > > > On Nov 20, 2:25 pm, Darian Shimy <dsh...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> Typically you would place the confirmation on the form, not an input >> field. Is there a reason the confirmation on the form would not work? >> >> Darian Shimy >> --http://www.darianshimy.comhttp://twitter.com/dshimy >> >> >> >> On Fri, Nov 20, 2009 at 11:14 AM, Dustin <pixell...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> > How could I ask a user to confirm specific form input? >> >> > EX: >> >> > <%= f.submit ''Donate'', :confirm => ''Confirm your donation amount: >> > ###amount###'' %> >> >> > Where the ###amount### would be replaced with the amount entered in >> > the form. >> >> > Thanks, >> > Dustin >> >> > -- >> >> > 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org. >> > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> > For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=. > > -- > > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > 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=. > > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 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=.