2. What is an entity form?
• A collection of entities presented as a form
• Can re-use existing fields
3. Why Entity Forms?
• Integrates with Drupal in ways other forms
cannot reach
– Features, Rules and Views integration
• Loosely coupled
• Don’t need to rewrite Rules engine
4. Problems
– Large amount of fields if you have large forms and
/ or a lot of them
– Embedding it in Content Types can cause issues
with double titles – solve with Context.
– Issues with featurising large forms and field sets
– Conditional fields did not work
5. Integration
• SugarCRM
– Wrote our own integration module
• Google Forms
– Extended Droogle module to cope with
Spreadsheets via Zend Gdata
• Email
– Use Rules and Drupal’s internal mail to contact our
Service Desk
6. References
• Modules
– Entityform http://drupal.org/project/entityform
– Droogle http://drupal.org/project/Droogle
• Book
– The Tiny Book of Rules, Johan Falk, Wolfgang
Ziegler, Leander Lindahl
http://archive.org/details/TheTinydrupalBookOfR
ules
7. Given to the Oxford Drupal Group
(groups.drupal.org/oxford)
by Iain Emsley
Twitter: iainemsley
Blog: www.austgate.co.uk
d.o.: iaine
Notas do Editor
Heavy use of Rules as shim layer so that user doesn’t know where data is goingEntity forms comes with a view that can be adapted or extended for views integrationWebform2Sugar module was tightly coupled and required custom code in the module to route – essentially building Rules engine in the module. SugaronDrupal module also tightly coupled.
Need to think about forms in the same way as thinking of databases – as Data Description rather than forms. E.g. if you have forms with questions, create the fields as field_question_1, field_question_2 with text areas or similar for other data types and re-use.Field sets would periodically disappear.
Yasim has its own rule to push data to the CRM. Used the Tony Book of Rules to create the code. Webform2Sugar focuses on pushing data into CRM, wanted something that could potentially pull it back, even if using anonymous federated log in.