I have just passed 6 months in cakephp and i am aware of basic
functioning in cakephp. Now i am trying to make reusable form widgets,
which can be put anywhere in the site without considering what
controller and action governs the page, in which that form is
inserted. For this i decided to make forms in elements folder. for
example i made login form in element folder as "login.ctp", and put
the code <? echo $this->renderElement("login"); ?> in views/
cmscontents/index.ctp file, now i want to put multiple autonomous
forms widgets in same page, in which no one should any how effect the
other one.
i got a little bit success in beginning but in further steps i became
confused. As in login form i made a login form
and post it to users/login action in users controller, but in next
step if the user not found i had to send failure result inside the
same login widgets above the form fields, i want to use <?php $session-
>flash(); ?> for this, but as far as i know i can't put <?php
$session->flash(); ?> in elements, hence i am confused how to control
all this.
So i need help, how to make independent form widgets in elements
folders, or at least how to handle this issue
Thanks :-)
--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
No comments:
Post a Comment