Rails form select from two options with a button - custom form implementation -
i have website want users able select type of user during registration process.
specifically, implementation want have 2 buttons on signup page, 1 called "seller" , 1 called "buyer".
the user should able select 1 button , once clicked, should stay highlighted (i know jquery not issue).
the selection should stored in column in users model called :type.
it seems pretty straightforward, "f.select" form method seems implement dropdown menu, wondering how can achieve implementation of 2 buttons.
since you're going use jquery, add hidden field type
, create 2 links , style them buttons, , use jquery update value of type
when user clicks 1 of "buttons".
Comments
Post a Comment