Adding Custom Fields to Forms

One of Shopware 6′ the most useful features for shop owners is the ability to add custom fields to almost any entity. Some benefits of custom fields are:

  • Can be defined and edited via admin out-of-the-box
  • Allow almost any field format
  • Can be grouped in logical groups

However, there is no standard mechanism that would make a custom field available for display in the storefront. You will need to extend your theme’s Twig templates to make custom fields visible for shop users. This is a straight-forward task, described very well in the docs: https://developer.shopware.com/docs/guides/plugins/plugins/storefront/using-custom-fields-storefront

In this post, I am going to demonstrate how you can add a custom field to a form, so that a user would even be able to submit additional data.

Continue reading “Adding Custom Fields to Forms”