I am having trouble trying to figure out how I handle a (CActiveForm) form in a widget.
I have a widget with a newsletter signup form.
The widget can be in any view so I am having trouble knowing how to submit the form and then return to the view the form widget was on.
Example:
Some listing page is rendered by the listing controller, with newsletter widget in the sidebar.
Someone fills out the form and submits to newsletter signup controller.
Let’s say there are newsletter form validation errors…
How do we get back to the listing view? I can save the route and go back but that can’t be right, it’s too cumbersome, I must be using the wrong approach.
Please help if you have a suggestion. I feel pretty strong at yii, I probably just need to be pointed in the right direction.