A quick overview of Entity Forms on Drupal

I’ve dived into Drupal’s entity forms project recently to build a series of forms, some of which re-use the same fields.

In the past, I’ve used Webforms which allows you to build a form quickly but not reuse the actual fields. I found that it also has issues with the integration in that it appears to have need custom code to move data fromĀ  one system to another. It is not designed for this (although it can be done).

Out of the box, the Entity Forms project has integration with Views, Rules and Features amongst other projects and can be used with Content Types as well as on their own. As part of this work, I have got myself involved with the rules module and writing my own custom rules in a module. (The Tiny Book of Drupal Rules is an extremely useful resource for this.) Using a rule, data can be sent across to a CRM system or sent to the Service Desk by other means. I was looking forward to getting a nice, flexible back end.

Once the modules is installed, it has a UI which is like the Content Types UI and you can create the form with existing or new fields from the Structure option in the admin section.

One thing that should be noted is that entity forms and the information being collected should be thought through and designed closely to make sure that you get the best from them rather than trying to go back and change fields later.

Featurising the forms turned out to be interesting. Having quite a few forms with associated rules turned out to have some issues. For some reason, we found that field groups did not featurise properly and lost the groups when being re-installed. The same thing with the confirmation URLs option which caused us issues with Contexts which needed some manual changes between sites. The database also grew since fields are being created which is somthing to watch if you have many forms or a few forms with a large amount of fields.

Web Forms is still great if you want to create polls but for my purposes, the integration provided by Entity Forms is far superior. Like most Drupal things, it is a case of horses for courses but consider what you are trying to do. In a future post, I hope to share some fun I had with getting Entity Forms to talk to Google Spreadsheets.

(Update: corrected some spelling and also removed a subclause to clarify a sentence)