This field plug-in is meant to demonstrate how to use field metadata. It adds a second input box below the regular text input, which will store metadata. This value is stored separately from the field's response. From the developer documentation for field plug-ins:
Your field plug-in can store metadata alongside response data. This metadata can be accessed by other fields in the form using the
plug-in-metadata(field)
function. This can be used to pass information from your field plug-in to other parts of the form. See this page for more info about form functions includingplug-in-metadata(field)
.
Note: this field plug-in is not intended to be used to collect actual data. It is intended for demonstration/testing purposes.
This field plug-in requires the text
field type.
- Download the example form extras/example-form from this repo and upload it to your SurveyCTO server.
- Download the feature-demo-metadata.fieldplugin.zip file from this repo, and attach it to the example form on your SurveyCTO server.
-
Example form
extras/example-form -
Developer documentation for field plug-ins
More instructions for developing field plug-ins.
https://github.com/surveycto/Field-plug-in-resources -
User documentation for field plug-ins
How to get started using field plug-ins in your SurveyCTO form.
https://docs.surveycto.com/02-designing-forms/03-advanced-topics/06.using-field-plug-ins.html