Hello,
I have a page with a list of forms, one form for each row in a table.
I'm trying to pre-populate all of these forms with one big find(all)
query. The pre-population never seems to happen though, I'm guessing
because there are multiple id fields present. Is there any way to
tell the form to prepopulate the data even if multiple id's are
present from the query?
thanks for any help,
example:
my controller: $this->set('clients', $this->Client->findAll());
my view:
<?php $i = 1; $count = count($clients); foreach($clients as $client): ?
>
<form name="client_form" action="#" onsubmit="update_client(this);
return false;">
<?php e($html->hidden('Client/id')); ?>
<fieldset>
<label><?php __('Client Name'); ?>:</label>
<?php e($html->input('Client/name', array('size' => 20,'class'
=>
'wide'))); ?>
</fieldset>
</form>
<?php $i++; endforeach; ?>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---