-
Notifications
You must be signed in to change notification settings - Fork 236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the ability to redirect based on a radio button chosen. #374
Conversation
Thanks for continuing to work on this @tsmorgan. I feel wary of using Spitballing - what about putting a |
Not sure I agree. The |
I think any approach is going to be non standard HTML, but I agree with Tom's reasoning. If we went with
Then talk about autodata, and how to do branching in routes. Then introduce that we have a shortcut for radios:
I think it's good practice to say there's always a value, and you can optionally add our redirect function. As I'm writing this, is it odd that the redirect isn't quoted? It doesn't need to be I don't think. |
Yeah, I don't think it should be quoted. It's within with quotes of the Just realise I've got the data being passed after the redirect (eg. |
OK that's done now. Would appreciate you guys checking it through a bit as the regex is new. It's definitely better this way around though, the explanation on the example page feels much simpler now. |
Based on #227 with an added example from @joelanman's #338 (also covers #362 too, I think).
The main difference with this PR from previous ones is that now we have data being stored in the session it's possible to address the comments from #338 and include the option to save data at the same time as redirecting.
The example page now contains two examples. The first shows the method of redirecting via radio button values and the second shows a more complex example involving aliens.