Yes, you can't use two forms, if you want both the title and the textarea to be submitted at the same time. In that case you only need one form.
If you want to update either of them independently of each other, then you can use two forms, or use two submit buttons, each named differently and processed accordingly in the controller. In any case, your form is not correct in your code, you are missing the echo $form->end(); Enjoy, John On Sep 22, 1:30 am, ramanujan <[email protected]> wrote: > Hi all. I'm new to cake and I'm trying to make a simple blog with a > private adminstrative section for adding posts and some other stuff, > and a public one which display post, let visitors add comments, search > posts etc. > > Well my problem is that I decided to add a static page (about page) in > the pages view folder and make its contents editable in the > administrative section. So I decided to make an administrative page in > which one can set the blog title and edit this about page via two > forms. > > Well both forms are not binded with any model and a call a diffent > action but the first form works, i.e. the action get called and data > passed to it, while the second one, which contains a textarea to edit > the about's content, doesn't, i.e. the action doesn't even get called. > > Is there any issue having two forms in the same view? > > Thisi is my code: [snip] > Note: admin_general is the administrataive page > > admin_general.ctp: > <div class="index"> > <div id="informazioni"> > <div class="intestazione"> > <h2>Titolo del blog</h2> > <?php > echo $form->create(false,array > ("action"=>"admin_blogTitle",'id'=>'formTitolo')); > ?> > <div class="fields"> > <div class="input text"> > <?php > echo $form->text('formTitolo.titolo',array > ("value"=>Configure::read('BLOG_TITLE'))); > ?> > </div> > <?php > echo $form->submit('Applica'); > ?> > </div> > </div> > <div id="editAbout"> > <?php > echo $form->create(false,array > ("controller"=>"my_pages","action"=>"admin_about",'id'=>'formAbout')); > echo $form->input('formAbout.about',array > ('type'=>'textarea','label'=>'Descrizione del blog', > 'rows'=>15,"value"=>$about)); > echo $form->submit('Salva modifiche'); > ?> > </div> > </div> > </div> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
