I am just facing the need form something that I believe it's not available and I think that webform can very well fill that gap, i want to hear some thoughts from you.
Specifically, I am creating a booking module that will work against an EPOS system. For the booking process I am building a multi-step form (but not using drupal FAPIs for that, but a rather own-style multi-step with $_SESSION). It's going to be a three-step form, and while I want total control over the first two, it would be great to have the third one somehow flexible and configurable by the user. To do that I would like to use something existant. I already tried using CCK somehow, by retrieving the node form manually and trying to emulate all what drupal_get_form() does but on my own controller but it started to seem too complicated.
As a second alternative I thought of webform. Because this is not really a node-based solution I thought it might work, although before really going so deep on your module I want to share this idea with you. Ideally, what would be great, is to have an api in a way I can create a webform using the UI of the module and then, use it on my own module and relate it, instead than to a node, to some internal ID.
In a very rough way, I am thinking of something of the following:
example_page() {
drupal_get_form('example_webform');
}
function example_webform() {
$form = webform_load('webform_nid');
return $form
}
Where I can have webform process the information or I can even have my own submission code where I might want a different or additional processing.
Any thoughts?
At this point I will create the form myself in the module without any flexibility whatsoever.
Thanks,
a.=
Comments
Comment #1
omerida commentedthese might give you enough flexibility to do what you want: #368723: Provide _validate and _process hooks
Comment #2
quicksketchYeah I've seen some similar, crazy uses of Webform. It's not really what it's intended for, but it's been done. You might take a look at http://drupal.org/project/salesforcewebform, which is sort of similar, where Webform is used entirely as a form-builder and doesn't actually save any of the results.
Comment #3
quicksketch