Motivation

There is a lot of data and features for webform elements that can be used in Drupal e.g. descripttion for the form element.

Steps to reproduce

Add some metadata/features on form elements and check the output of the webform. Hardly anything is included to json output.

Proposed resolution

Go through basic elements metadata and features and add them to json according to schema. Some features might not be supported by react library but needed for our project.

Comments

Sceefo created an issue. See original summary.

sceefo’s picture

Issue summary: View changes
sceefo’s picture

Issue summary: View changes
sceefo’s picture

StatusFileSize
new757 bytes

Patch to add description to elements.

sceefo’s picture

StatusFileSize
new1.41 KB

Here is added confirmation messages html tags into submission reply by removing strip_tags. There could be a way to find out which format is used and use that to allow certain list of tags, but for now the confirmation message is given by administrator and the format is needed on REACT app.

sceefo’s picture

This is a special webform element handling to transformer.

We needed an element for decoupled system to know that it is file upload to 3rd party bucket and return file tokens as string.

There most likely should be a property in every or most of the webform elements that you could add some property for jsonschema but that would be extra step for content creators and not as self explanatory as own element for the job.

I will add the element used in our project if someone needs it. Base was WebformExampleElement and modified the element to extend TextBase.

sceefo’s picture

StatusFileSize
new1.95 KB

Switching to use pattern for sending the info about decoupled-file field to comply with jsonschema standard.

sceefo’s picture

StatusFileSize
new1.96 KB

Switch from pattern property to format.