Signup page with additional options
I'm trying to create a pricing page where the user first selects the topic, and then they selects the plan.
I cant figure out to do both on one page, as the topic will be the same for all of the plans, but each plan is different.
I have a hidden field called topic which holds the selected topic, but how do I know which submit button will be clicked.
Heres an image with what I'm trying to achieve.
http://cl.ly/3N3b3U0J261r3f1T3q3i
You can add different value
to each submit button:
<%= f.submit "Plan 1" %>
<%= f.submit "Plan 2" %>
<%= f.submit "Plan 3" %>
And you can read this value from params
hash.
Or you can change name
field in submit button and check it also in params
hash.
Hmm, maybe, you could add a name to each form and then check in the params which form it is.
精彩评论