I took a look at the examples, however I'm having trouble converting
it to what I need. I'm not great at php, but I'm very familiar with
rails.
I'm using a javascript function to submit the records individually
with ajax, so I don't need all the extra save methods with the
arrays. They'll be arriving one at a time to my controller, then I'll
update and refresh the form list with ajax.
In your link that you provided, i couldn't find any of the controller
source code. What find method should I use to look up all of my
records?
thanks!
On Sep 23, 11:54 pm, Geoff Ford <[EMAIL PROTECTED]> wrote:
> Also - $html->hidden('Client/id') wont work with a findall because the
> findall results array is slightly different to that of find.
>
> Geoff
> --http://lemoncake.wordpress.com
>
> On Sep 23, 9:28 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> > 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
-~----------~----~----~----~------~----~------~--~---