Skip to content

isabella232/baseline-select_one

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Baseline select_one field

Default appearance for the 'baseline-select_one' field plug-in

likert minimal quick
likert appearance minimal appearance quick appearance

Description

A simple replacement for the default select_one field, plus a few improvements (see below). You can either download and use this as-is, or you can use it as a starting template when creating your own field plug-in for a select_one field.

Download now

Features

In addition to supporting the default SurveyCTO features listed below, this field plug-in offers the following expanded functionality:

  • Support for RTL languages
    If your label, hint, or choice labels are in a language that uses a right-to-left alphabet (like Arabic), they will be right-justified, and the radio buttons will be to the right of the choice labels. If your form contains both right-to-left and left-to-right choice labels, the formatting will respond to the currently-selected form language.
  • Support for HTML in choice labels
    This plug-in will allow HTML in choice labels to be rendered as HTML, even in Collect on Android and iOS.
  • Support for HTML in field references
    If you reference another field's value in either the field label or field hint, and that referenced value contains HTML, the HTML will be correctly rendered.

Data format

This field plug-in requires the select_one field type.

How to use

Getting started

To use this plug-in as-is, just download the baseline-select_one.fieldplugin.zip file from this repo, specify this field plug-in as a custom field appearance in the form design (like in the test form), and attach it to your form. For more details about using field plug-ins, please read the user documentation.

To create your own field plug-in using this as a template, follow these steps:

  1. Fork this repo
  2. Make changes to the files in the source directory.
    • Note: be sure to update the manifest.json file as well.
  3. Zip the updated contents of the source directory.
  4. Rename the .zip file to yourpluginname.fieldplugin.zip (replace yourpluginname with the name you want to use for your plug-in).
  5. You may then attach your new .fieldplugin.zip file to your form as normal.

For more information about developing your own field plug-ins, please read the developer documentation.

Default SurveyCTO feature support

Feature / Property Support
Supported field type(s) select_one
Default values Yes
Custom constraint message Yes
Custom required message Yes
Read only Yes
media:image Yes
media:audio Yes
media:video Yes
quick appearance Yes
minimal appearance Yes
compact appearance No
compact-# appearance No
quickcompact appearance No
quickcompact-# appearance No
likert appearance Yes
likert-min appearance Yes*
likert-mid appearance No

Note: this plug-in works well for the likert-min appearance when the field label is short, and does not contain an image, audio, or video. This is a known limitation currently.

More resources

About

A baseline replacement for the default select_one field.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 42.0%
  • CSS 32.9%
  • HTML 25.1%