How can we create a custom element type in Drupal 8 webform module?
-
I have figured it out how it will be... I'm little busy now. Will post the answer here in some time. It will help others in future.– CoolCommented May 30, 2017 at 6:28
-
Please post the answer as a recipe here drupal.org/docs/8/modules/webform/webform-cookbook– jrockowitzCommented May 30, 2017 at 10:51
-
@ARUN can you post it? I've been searching and no luck yet.– KartagisCommented Jul 12, 2017 at 13:02
Add a comment
|
1 Answer
There are many example module in the webform module itself, and three examples of custom elements all quite clear and detailed:
- Composite element - webform/modules/webform_example_composite
- Element - webform/modules/webform_example_element
- Handler - webform/modules/webform_example_remote_post
- Config examples - webform/modules/webform_examples (pre-built forms)
Using the example module makes it all simple, in this case you are extending the class WebformCompositeBase
to implement your own composite element.
-
2cgit.drupalcode.org/webform/tree/modules/… there is custom module could help you. Commented Oct 31, 2017 at 19:44