I got a problem I cannot solve using the docs or google.
I have a Model User, which contains all users. Every User belongs to a
Company, so I added a foreign key company_id to the users table and
added a table companies. Everything is working well to this point.
Know I want to add the following workflow:
When a user is created, he can add the company he belongs to by just
entering the name of this company to a input-field (type: text). So I
added the following to the view:
<?= $form->input('company',array('type'=>'text')); ?>
But how do I proceed within the add action? Espacially when I want to
use the validation.
I'm not sure if I have to create a new company-object and validate
everything myself or if I can use some build-in functionallity.
Thanks in advance.
Regards,
Sebastian
--~--~---------~--~----~------------~-------~--~----~
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