Hi there, I am new to Drupal, so it's not unreasonable that I might look at this completely from the wrong perspective, but here we go:
I need a new content type, users of a certain role should be able to submit "lecturer submissions" for events. The problem is that there are (among other things) 0 to n co-authors for every submitted "lecturer submission" and I am not sure how to implement that.
I used the hook_form to specify the create content->lecturer submission form, now I want to give the user the possibility to add a variable number of co-authors. In a perfect solution, there would be some custom submit button labelled 'add a co-author' and 'remove this co-author'.
I implemented hook_submit, but it seems as if control flow never passes that function when I use a custom submit button. Isnt there a way to add a submit button to a form and provide some callback function to redraw an altered form with an added/removed co-author?
I read the form-api, the better part of the available developer documentation and googled the site:drupal.org but had no luck yet. I also had a look at the existing modules, but those with a similar problem all solved it with comma or semicolon seperated lists of values, which is no option for me as we need about 10 values for every co-author (name_last, name_first, institute/company ..)
In a nutshell: I want the user to be able to specify a 0..n relationship to an entity (in my case co-authors) while creating the node (in hook_form or any other applicable way). The co-authors are no users in the drupal sense, as we cannot expect every co-author to have an account.