I read how FAPI is very flexible. Well I started using it and after a few minor issues I have it working for a good deal of a multi-part form. (Using #state and fieldset) Now I want to embed an Availability Calendar in the form and I can not figure out if it is possible. The newest Availability Calendar is based on entities and fields. My FAPI/module form is just that, a straight forward form. To expose an Availability Calendar I have to create a content type. So I am stuck with a content type instance and my own form module, trying to figure out if I can merge the 2.

I'd really like to keep the calendar inside the form in its own collapsible section (via fieldsets), only exposed in the UI when the user has selected other info. This means I either embed Calendar inside a form, or possibly a form inside the Content Type.

Any pointers ? Am I missing something to glue these parts together? I considered EntityForms but it doesn't seem flexible enough to make nicer forms. (radios?) My only solution may mean splitting Avail Calendar off on its own page and make it part of a series in a multi-part form.

I don't mind writing php, I am likely going to modify Availability Calendar booking formlet.


To add a form inside already existing form you can try out the following:

$form['another_form'] = array(
'#markup' => drupal_get_form($form_id);
|improve this answer|||||
  • This is a start. I haven't found any other solution but perhaps I can make a form that displays the drupal avalability calendar and nothing else. I still need to put a content type inside a form. – user23313 Nov 1 '13 at 16:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.