We are also dealing with that same problem. We want to extend the register form with a custom field, which was set up in backend. Have you already found a solution for that? We tried a lot of combinations in the register form, but none worked. From my point of view, the mapping function for custom_fields in the registration service isn´t implemented yet?
I am also struggling in this part. I am adding a text in the Custom field, and I want to do Data mapping with this field in the administration. Did anyone find a solution to that?
Thank you for sharing your code, what saved us a lot of time! For the sake of completeness, you need to mention, that the subscriber needs to be added in an extended services.xml ([yourPlugin]/src/Resources/config/services.xml) like:
If you use CustomerEvents::MAPPING_CUSTOMER_PROFILE_SAVE => ‘addCustomField’ too in getSubscribedEvents() the thinggi works in customer account profile save, too! Thanks for your tipps.
In Shopware 6.4.15 saving a custom field to a customer worked without the need for a subscriber:
In the registration form just add a field with follwing name:
name=“customFields[my_custom_field]”