Is it possible to save a configured element for re-use in other forms? For example, in building a form I create a complex element which includes various child elements and domain specific configuration. I'd like to save that element for re-use on other forms so that I don't have to re-build the complex element from scratch every time. The element would be available from the element selection (+Add element action) and included in element listings (/admin/structure/webform/settings/elements).

There are three usage scenarios:

  1. I'd like to use the saved element as a template (much like webform templates) which I could then tweak if required to suit the form I was using it on.
  2. I'd like to use the saved element on multiple forms and have updates to the element template automatically update the element instances.
  3. I'd like to be able to tweak some fields but know that other "locked" fields will be managed at the template level.

Hope this makes sense. I don't think this is covered by any existing functionality and i couldn't see anything in the issue queue.

BTW - thanks for a superb module. 8.5 is one of the best conceived and executed modules I've come across in many years of using Drupal.

Comments

chaps2 created an issue. See original summary.

jrockowitz’s picture

My immediate reaction is that you should just create your own form elements which would address 1, 2, and 3. It is pretty easy to do and you could extend existing elements. For example, you could extend a select menu hard code the #options and remove most of the other properties. In this presentation by Philip Norton, Slide 42 starts discussing Custom Components.

At some point, I want to build a UI for customizable composite elements. I think you are making an argument for a UI for managing custom elements. Both tasks are a significant amount of work.

I would argue that documenting and improving creating custom elements and composites via code using the FormElement and WebformElement plugins is a more immediate task.

jrockowitz’s picture

Status: Active » Closed (won't fix)

I don't see this feature getting implemented via the core webform module.