0

I created the Form.i click the new link button display only title,did not work include_partial(),

What is the problem? any body plz help me.other module forms works fine. This is newsuccess.php(template)

            <h1>New Album</h1>


                   <?php include_partial('form', array('editFormFields'=>$editFormFields)) ?>

this is my form.php

           <?php use_stylesheets_for_form($form) ?> 
           <?php use_javascripts_for_form($form) ?>


       <form action="<?php echo url_for('album/'.    ($form->getObject()->isNew() ? 

      'create' : 'update').(!$form->getObject()->isNew() ? '?id='.$form->getObject

           ()->getId() : '')) ?>" method="post" <?php $form->isMultipart() and print 

        'enctype="multipart/form-data" ' ?>>
            <?php if (!$form->getObject()->isNew()): 

            ?>
             <input type="hidden" name="sf_method" value="put" />
           <?php endif; ?>
                    <table>


                 <tfoot>
                     <tr>
                    <td colspan="2">
                   &nbsp;<a href="<?php 

               echo url_for('album/index') ?>">Back to list</a>
                    <?php if (!$form-

                    >getObject()->isNew()): ?>
                       &nbsp;<?php echo link_to('Delete', 

        'album/delete?id='.$form->getObject()->getId(), array('method' => 'delete', 

        'confirm' => 'Are you sure?')) ?>
               <?php endif; ?>
                    <input 

                  type="submit" value="Save" />
               </td>
                     </tr>
                    </tfoot>
                   <tbody>


                     <?php echo $form ?>
                   </tbody>
                   </table>
                      </form>

My apachy error log nothing to display

Plz help me.

0

1 Answer 1

1

name of partials should begin with _, so it should be

_form.php

"The partial file name is _mypartial.php and is looked for in modules/mymodule/templates/" from http://www.symfony-project.org/api/1_4/PartialHelper#method_include_partial

Sign up to request clarification or add additional context in comments.

3 Comments

Hi prasad,Thanks for ur reply.solved that problem.but i have another ona error.i changed some fields. i have the following error.Notice: Undefined variable: planbook in -form.php line 37 that line is <?php echo $planbook->getTitleName() ?> and call to a memeber function getTitleName() error. plz help me.
I have answered that question as well. Pl accept the answer & upvote if it solves the problem.
hi,i saw ur answer,and changed .but still same problem.plz paste full line.plz

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.