Allow other modules to extend the webform content creator functionality

Created on 4 August 2020, over 4 years ago
Updated 17 March 2023, about 2 years ago

The webform content creator is a great module and a real asset to the webform suite of modules, the issue I see is that at the moment field support is limited to just what the module provides where it feels like this could be easily opened up to make use of the plugin system.

I realised this as I was trying to add a patch to enable the mapped value to be adapted, in my case to allow address fields to be utilised.

I suspect the best approach would be to add a ContentCreatorSourceMap plugin, which would be selectable when mapping the field, with just a few attributes

* label
* [webform_element_types]

and would just have a mapValue() method.

By default you could just have an EntityReferenceContentCreatorSourceMap, CheckboxContentCreatorSourceMap, DefaultContentCreatorSourceMap which would just allow the logic in the entity mapNodeField method to be largely abstracted away. And could then be easily extended for other element types.

If I get time I'll try to take a bit more of a look at this, if it's something you think makes sense.

Feature request
Status

Fixed

Version

3.0

Component

Code

Created by

🇬🇧United Kingdom andy_w

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024