Regarding forms

19 views
Skip to first unread message

venkatram akkineni

unread,
Sep 5, 2011, 4:52:18 PM9/5/11
to ram...@googlegroups.com
Hi

         I am trying to use forms to create a signon page with password reset and regsiter buttons included. I have three divs with jquery buttons. I have a name / value pair for each button so I can check on the server side which button was pressed. How ever, when I use the statement below the request goes back to the server when I load the page as opposed to when I click the button. How can I achieve the desired behaviour ? 

<?r form_for(@user, :method => :post, :action => MainController.r(process)) do |form| ?>

// All the input elements, labels and buttons are listed in here. 

<?r end ?>

--
Sincerely
Venkat R Akkineni

Yorick Peterse

unread,
Sep 5, 2011, 5:06:14 PM9/5/11
to ram...@googlegroups.com
Venkat,

You're calling a variable inside MainController.r(), this should most likely be
MainController.r(:process) instead of MainController.r(process). Other than that
I'm not entirely sure what you're trying to achieve.

Yorick

--
You received this message because you are subscribed to the Google Groups "Ramaze" group.
To post to this group, send email to ram...@googlegroups.com.
To unsubscribe from this group, send email to ramaze+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ramaze?hl=en.

venkatram akkineni

unread,
Sep 5, 2011, 5:24:22 PM9/5/11
to ram...@googlegroups.com
Yorick

            Thanks for the reply Yorick. I am basically trying to map a ui buttons to the controller. Since I have three buttons and a couple of input fields ( Username and password ). I just need to invoke the action methods, be able to grab data from the request and perform the appropriate action. Process is a method inside controller and not a variable. 

Please find my html code attached to the email. 

Thanks
Venkat
code_snippet.html

venkatram akkineni

unread,
Sep 5, 2011, 6:38:16 PM9/5/11
to ram...@googlegroups.com
Yorick

Never mind, I guess I can call DOM form object's submit() method
inside query ui's event handler. I will try this.

Thanks

--
Sent from my mobile device

Christian MICHON

unread,
Sep 5, 2011, 6:41:23 PM9/5/11
to ram...@googlegroups.com
On Mon, Sep 5, 2011 at 11:24 PM, venkatram akkineni
<venkatram...@gmail.com> wrote:
> Yorick
>
>             Thanks for the reply Yorick. I am basically trying to map a ui
> buttons to the controller. Since I have three buttons and a couple of input
> fields ( Username and password ). I just need to invoke the action methods,
> be able to grab data from the request and perform the appropriate action.
> Process is a method inside controller and not a variable.
> Please find my html code attached to the email.
> Thanks
> Venkat

I would suggest registration and password reset to be links instead of
buttons, redirecting you to specific forms.

--
Christian

Reply all
Reply to author
Forward
0 new messages