eZ Community » Learn » eZ Publish » Create a feedback form in eZ Publish...

Create a feedback form in eZ Publish 5 using ezforms-bundle

Monday 12 May 2014 3:33:49 pm

  • Currently 3 out of 5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Conclusion

You saw how to use eZFormsBundle to bridge the gap between eZPublish contents and Symfony forms:

  • Form definition with a model class and a Symfony FormType
  • Content/Form association with a FormProvider
  • Data processing logic with FormHandler
  • Content/processing logic association with a HandlerProvider

This is a relatively easy use case but eZFormsBundle contains a few additional classes and services to help you suit other needs (a ChainHandlercontent aware or location aware handler interfaces, a ResponseProvider, ...), see bundle's documentation to learn more about its internals and the tools it provides.

As you could see, the bundle is not completely plug'n'play yet. That is because we don't know what should be the default behaviour and didn't want to close doors too early. We rather chose to expose the inner concepts to show their versatility.

We're really eager to hear your feedback on how difficult you find it to use, what sucks and what could be improved!

  • What should be the default FormProvider?
    • Content remote id mapping like we just did?
    • A special field type to let administrator users select the form type in a list?
    • A complete form builder fully editable in the administration interface?
  • What should be done with the email handler?
    • Should we add out of the box email handlers services to the bundle, beyond the abstract class (AdminEmailHandlerUserEmailHandler)?
    • Should we define interfaces like EmailRecipientInterface or FileAttachmentsContainerInterface to help defining model classes
  • What other common data processing should be included in the bundle?
    • An obvious candidate is a DoctrinePersistenceHandler but how should it work?

These are a few ideas we already have, feel free to comment them and share yours. You also can directly participate in the project: the code is fully accessible on GitHub and we are very welcome to pull requests and new contributors.

 

 

 

About the author: Benjamin Choquet

Benjamin Choquet

Benjamin Choquet has been a web developer for 13 years and is lead developer at Heliopsis since 2009. After numerous headaches on Typo3 he happily joined the eZPublish community 4 years ago.

 

License choice

 

Creative Commons - Share Alike

Creative Commons - Share Alike

This work is licensed under the Creative Commons – Share Alike license (http://creativecommons.org/licenses/by-sa/3.0)

 

Printable

Printer Friendly version of the full article on one page with plain styles

Author(s)

Proudly Developed with from