Customized text inside placeholder of integer type field |
Use this field plug-in to use customized text in the placeholder of integer type field.
For this field plug-in, enter the text for the text
parameter (see Parameters below), and that text will be shown into the field's placeholder. It can only be used with integer field type.
This plug-in was developed based on the baseline-integer field-plug-in, therefore, also supports the additional improvements in the baseline-integer field-plug-in.
Feature / Property | Support |
---|---|
Supported field type(s) | integer |
Default values | Yes |
Constraint message | Uses default behavior |
Required message | Uses default behavior |
Read only | Yes (shows the current value, if present) |
media:image | Yes |
media:audio | Yes |
media:video | Yes |
show-formatted appearance |
No |
To use this field plug-in as-is, just download the integer-placeholder.fieldplugin.zip file from this repo, and attach it to your form.
To create your own field plug-in using this as a template, follow these steps:
-
Fork this repo
-
Make changes to the files in the
source
directory.- Note: be sure to update the
manifest.json
file as well.
- Note: be sure to update the
-
Zip the updated contents of the
source
directory. -
Rename the .zip file to yourpluginname.fieldplugin.zip (replace yourpluginname with the name you want to use for your field plug-in).
-
You may then attach your new .fieldplugin.zip file to your form as normal.
There is one parameter, text
, which is the custom text. The following example can be used in appearance for a integer field:
custom-integer-placeholder(text='Please write the age in full year')
- Test form
extras/testform - Developer documentation
Instructions and resources for developing your own field plug-ins.
https://github.com/surveycto/Field-plug-in-resources - User documentation
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