Loading the form and validating in the same function? |
[eluser]parham90[/eluser]
Duh! And I thought through some magic trick I'd never come to understand, this code example I saw on the net works like a charm! ![]() Thanks a lot, and sorry for causing you all frustration.
[eluser]Ivan A. Zenteno[/eluser]
But why your controller is like that? I mean the controllers is like then: Code: function foo()
[eluser]parham90[/eluser]
Yes, I read that piece of code I wrote (well, something like that) somewhere on the Internet. I assumed the rules have to be set only when the page is loaded as a form, and therefore, the strange form you saw. It is fixed now, though.
[eluser]skunkbad[/eluser]
If you'd like to see a working example of form validation and posting to the same method, you might check out the add_category method on this page: http://bitbucket.org/skunkbad/community-...entory.php
|
Welcome Guest, Not a member yet? Register Sign In |