I’m not a fulltime php-dev, and in my first Yii project, I ran into the following problem for which I couldn’t find a complete tutorial anywhere.
Discussions, arguments on how to hacks, loads of them, but can someone please take the time to explain from A to Z how to implement many-to-many data and update it in a form?
My example: I have 3 Models: Coworker <- CoworkerLanguage -> Language
The second one is the pivot, many-to-many-table or whatever you may call it.
I have succeeded in CRUD for both Coworker and Language.
But what I want is a Listbox in the Coworker form.php in which I can select multiple languages, which in turn would be updated in the CoworkerLanguage.
This works for small lists like languages, but what if I would like to add this with a textfield which let me search with autocomplete and a plus-button next to it to create the relation?
I can’t believe there is not a soul out there that hasn’t run into this problem before.
So please, explain
Thank you in advance.