tags:

views:

32

answers:

1

Hello,

I hope this makes enough sense and someone can give me some feedback on this My problem is how to get back to the same form on errors found, but with the error values in place.

As you would normally postback to the same script and set the variables as you go. Now I am in the situation, that when I do the validation and try to show the same form but with the errors, I get a page/view within a page/view.

I sort of get where this is coming from, but I haven't found a solution yet, besides creating a different view that has the same contents, but is a different file. The latter seems redundant.

BACKGROUND:

All controllers extend the basecontroller that creates the main view. All other views/files deliver their content to the mainview $content variable.

thanks, Richard

+1  A: 

As an alternative to what you do, you can use sessions to store your error messages and redirect the to the same page and showing errors by reading from session again. On success, you should delete all error sessions.

Sarfraz
Thanks, yes, ofcourse that is also one way to go
Richard