??Error?? on page 85 Listing 6-10...

1 message Options
Embed this post
Permalink
Cantaberry

??Error?? on page 85 Listing 6-10...

Reply Threaded More More options
Print post
Permalink
Listing 6-10 says to use the 'User' and 'Tag' fields for the $form->input().  Doing so gives the rendered code of:

<select name="data[Post][User]" id="PostUser">
<input type="checkbox" name="data[Tag][Tag][]" value="4" id="TagTag4" />

When these are used, it doesn't seem to get into the db...  (and the model doesn't barf, either).

If done with user_id and tag_id, every thing seems to work fine and the rendered code you get is:

<select name="data[Post][user_id]" id="PostUserId">
<input type="checkbox" name="data[Post][tag_id][]" value="4" id="PostTagId4" />

And these seem to work.

So, could some one tell me if the way I'm suggesting is right and confirm that when you do the form you have to use the id reference that's in the model you are working with (as this is how it seems from this debug..)???  Thanks!