seems a bit off. You mention you want to be saving the Todo titles but
your form field is the Todo's ID field filled in with the title data.
Also, I haven't tested this yet but you may have to supply the ID for
each Todo as hidden form elements. So the modified loop might look
like this:
<?php $i = 0; foreach($task['Todo'] as $todo): ?>
<li>
<?php e($form->hidden("Todo.$i.id", array('value'
=> $todo['id']))); ?>
<?php e($form->text("Todo.$i.title", array('value'
=> $todo['title'], 'class' => 'long'))); ?>
</li>
<?php $i++; endforeach; ?>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment