Wondering how to create form that will edit on a specific table.
Example is I have a User that on their Profile has data that relates
to a HABTM set up. For example on the user Profile there are blocks of
data that represent Artists, Genres, and Favorites which all belong to
the User.

So when the User is viewing their own Profile they can edit specific
areas and not 1 big form. So if they click edit artists, its a form
that only shows the Artists part of the profile.

I copied the edit function straight from baking and renamed it
edit_artists and copied the edit form removing all the elements except
for the artists part, and shows just the artists as I want.
But the form when I check the rendered HTML seems to still be using
the edit function to save the data, not my edit_artists function.

The edit_artists form looks like:

<div class="update artists form">
<?php echo $form->create('Artists');?>
        <fieldset>
                <legend><?php __('Update artists');?></legend>
        <?php
                echo $form->hidden('id');
                echo $form->hidden('user_id');
        ?>
        <div class="user_checks"><?php echo $form->input('Artists',array
('multiple'=>'checkbox', 'label' => 'Artists:'));?></div>
        </fieldset>
<?php echo $form->end('Submit');?>

It works but is that how its supposed to work?

Thanks,
Dave


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to