the default form action parameter is add ,as below, you just need to assign
it
echo $form->create('
>
> EmployeesAccreditation', array('action' => 'edit'));
On Sun, Sep 28, 2008 at 7:58 PM, jojiju <[EMAIL PROTECTED]> wrote:
>
> hi all,
> I have tables employees and accreditations and join table called
> employees_accreditations. now I want to build the edit form which
> should populate the information both from employees and
> accreditations. its driving me crazy please help.
>
>
> <div>
>
> <fieldset>
> <legend><?php __('Edit Employee'); ?></legend>
> <?php
> echo
> $form->create('EmployeesAccreditation');
> echo
> $form->input('id',array('type'=>'hidden'));
> echo $form->input('card_no');
> echo
> $form->input('card_expiry_date',array('type'=>'text'));
> echo $form->input('first_name');
> echo $form->input('surname');
> echo $form->input('date_of_birth');
> echo
> $form->input('street_no_and_name');
> echo $form->input('suburb');
> echo $form->input('state');
> echo $form->input('post_code');
> echo
> $form->input('telephone_number');
> echo $form->input('mobile_number');
> echo
> $form->input('driving_license_number');
> echo $form->input('position_title');
> echo
> $form->input('employer_company_name');
> echo
> $form->input('employer_contact_person_name');
> echo
> $form->input('employer_department');
> echo
> $form->input('employer_telephone_number');
> echo
> $form->input('employer_mobile_number');
> echo
> $form->input('employer_fax_number');
> echo
> $form->input('employer_email_address');
> echo
> $form->input('employer_street_no_and_name');
> echo
> $form->input('employer_po_box');
> echo
> $form->input('employer_suburb');
> echo $form->input('employer_state');
> echo
> $form->input('employer_post_code');
> echo
> $form->input('allergy_description');
> echo $form->input('sub_category',
> array('type'=>'select','options'=>array('M'=>'M')));?>
> <legend><?php __('Edit
> Accreditations'); ?></legend>
> <?php
> echo
> $form->input('Accreditation.accreditation_id',
> array('type'=>'select','options'=>$accreditationList,'selected' =>
> $preferenceaccreditation,'label' => __('Accreditation Name', true)));
> echo
> $form->input('Accreditation.certification_number');
> echo $form-
> >input('Accreditation.issue_date',array('type'=>'text'));
> echo $form-
> >input('Accreditation.expiry_date',array('type'=>'text'));
> echo $form-
> >input('Accreditation.due_date_assignments',array('type'=>'text'));
> echo $form->submit('Edit');
> echo $form->end();
> ?>
> </fieldset>
> </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
-~----------~----~----~----~------~----~------~--~---