/
Custom fields to NL Form Plugin

Custom fields to NL Form Plugin

This is an example plugin to add custom fields to your Shopware 6 newsletter subscription form. Used in conjunction with the Maileon plugin, the fields created can be submitted to Maileon as contact fields. The added fields are not stored in Shoprenter.

Starting from plugin version 1.3.0, it is possible to submit standard fields through the form. In this case, version 1.1.0 should be used; older plugin versions are only compatible with version 1.0.0.

Installation

 

  File Modified

ZIP Archive XQueueShopware6CustomForm_v1_0_0.zip

Mar 16, 2023 by Zsolt Mannheim (Unlicensed)

ZIP Archive XQueueShopware6CustomForm_v1_1_0.zip

Jan 25, 2024 by Zsolt Mannheim (Unlicensed)

 

The installation package can be downloaded here.

You can upload the package in the Shopware 6 admin interface as follows:

  • Go to Extensions → My extensions

  • Click to the Upload extension button

  • Select the installation package and open

  • After install, activate the plugin

Change fields

Go to the /custom/plugins/XQueueCustomForm/src/Resources/views/storefront/element/cms-element-form/form-types/newsletter-form.html.twig

Here you can add extra fields to the form:

<div class="{{ formRowClass }}"> {% block cms_form_newsletter_input_custom_field1 %} {% sw_include '@Storefront/storefront/element/cms-element-form/form-components/cms-element-form-input.html.twig' with { fieldName: 'customField1', type: 'text', additionalClass: 'col-12', label: 'Custom Field 1', placeholder: 'some custom field data' } %} {% endblock %} </div>

 

Send standard fields (only with plugin version 1.3.0 and above)

We can submit standard fields with the following field names:

Field name

Standard field

Remark

Field name

Standard field

Remark