Nested form with a N-N relation and a predefined list of elements to choose


I recently had to deal with nested form, and I found quite complex to handle it with my situation.

I have a list of choices and want to allow the user to use some from a predefined list, by using checkboxes.

I posted the question on Stack Overflow a few days ago, but nobody answered yet.

So, to not duplicate the text, here is the link:

Regards, B.D.