开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜