I'm having a hard time deciding on how to develop the following functionality in my upcoming module:
I'm developing a module which should eventually be able to create "event" type nodes. Which extend the nodes functionality to have:
- One or multiple plannings which consist out of...
- ... timespaces, which has the following properties, per timespace:
- from (datetime)
- to (datetime)
- limit of subscribers (int)
- And other stuff (not related to the question)
- The website visitors should be able to subscribe to each timespace with a form, filling out their information. But if, and only if the limit of subscribers has not been reached yet for this timespace.
- After subscription, the visitor should get an automatic mail with a PDF (ticket) attached to it.
- Our customer should be able to export all the data, at any time to an Excel sheet...
- ... and (preferably) quick-review all the subscriptions at all time.
Well, the plannings and the timespaces won't be a problem, I'll manage that. But I would absolutely LOVE to incorporate Webforms into this. Since, point 3 through 6 all address functionality that already exists in Webforms... It'll save my butt a lot of time developing this thing.
My question is... Does anyone have any experience developing a module, incorporating Webforms? If so, how did you combine the two? I was thinking about something in the lines of:
- Developing a new Field widget which would make it possible for the moderators to create the event's plannings and timespaces.
- Somehow, (and this is the part where I'm not sure how to do this) creating a field for "webform" that would fetch the possibilities from the field.
I'm not sure.. I don't think this is the right way to go... I wonder what you guys think about this and if I simply should develop my own form + all the functionalities with it. Or maybe know a contrib module that does all of this...