Problem with select2 witdget

Hi! I have a little problem with Select2 Widget. I have in my application one many-to-many relationship to save authors for one book. In book form, I use a select2 for authors selection (many) and, in return to book controller, I need get this authors. However, the select2 form field is new and isn’t in book model (because yours values is going to another table). My question: how can I do to get the select2 values in book controller to create a new book with your authors? Regards…

Theres thing called depended dropdown. Based on select2. Works in way:

U pick author, 2nd dropdown preloads books of this author. I assume its your task goal.