You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+35-27Lines changed: 35 additions & 27 deletions
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,44 @@
1
1
# Baseline integer field
2
2
3
-

3
+

4
4
5
5
## Description
6
6
7
-
A simple replacement for the default integer 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 integer field.
7
+
A simple replacement for the default *integer* 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 *integer* field.
In addition to supporting the default SurveyCTO features listed below, this field plug-in offers the following expanded functionality:
14
+
15
+
1.**Support for RTL languages**
16
+
If your *label* or *hint* is in a language that uses a right-to-left alphabet (like Arabic), it will be right-justified.
17
+
1.**Support for HTML in field references**
18
+
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.
19
+
20
+
### Data format
21
+
22
+
This field plug-in requires the `integer` field type.
23
+
24
+
## How to use
25
+
26
+
### Getting started
27
+
28
+
**To use this plug-in as-is**, just download the [baseline-integer.fieldplugin.zip](https://github.com/surveycto/baseline-integer/raw/master/baseline-integer.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](https://github.com/surveycto/baseline-integer/raw/master/extras/test-form/test-form-package.zip)), and attach it to your form. For more details about using field plug-ins, please read the [user documentation](https://docs.surveycto.com/02-designing-forms/03-advanced-topics/06.using-field-plug-ins.html).
29
+
30
+
**To create your own** field plug-in using this as a template, follow these steps:
31
+
32
+
1. Fork this repo
33
+
1. Make changes to the files in the `source` directory.
34
+
***Note:** be sure to update the `manifest.json` file as well.
35
+
1. Zip the updated contents of the `source` directory.
36
+
1. Rename the .zip file to *yourpluginname*.fieldplugin.zip (replace *yourpluginname* with the name you want to use for your plug-in).
37
+
1. You may then attach your new .fieldplugin.zip file to your form as normal.
38
+
39
+
For more information about developing your own field plug-ins, please read the [developer documentation](https://github.com/surveycto/Field-plug-in-resources).
40
+
41
+
### Default SurveyCTO feature support
12
42
13
43
| Feature / Property | Support |
14
44
| --- | --- |
@@ -22,37 +52,15 @@ A simple replacement for the default integer field, plus a few improvements (see
22
52
| media:video| Yes |
23
53
|`show-formatted` appearance | No |
24
54
25
-
## Expanded feature support
26
-
27
-
In addition to supporting the default SurveyCTO features listed above, this field plug-in offers the following expanded functionality:
28
-
29
-
1. Support for RTL languages
30
-
If your *label* or *hint* is in a language that uses a right-to-left alphabet (like Arabic), it will be right-justified.
31
-
1. Support for HTML in field references
32
-
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.
55
+
### Parameters
33
56
34
57
**Note about the keyboard on iOS:**
35
-
iOS has a less-consistent way of determining which on-screen keyboard to display than Android. If you plan on using this plug-in on iOS, you should test your form on the actual iOS device that you plan on using. If the wrong keyboard appears (for example, if there is no minus button available), you may supply an optional parameter to the plug-in to set the keyboard type manually.
58
+
iOS has a less-consistent way of determining which on-screen keyboard to display than Android. If you plan on using this plug-in on iOS, you should test your form on the actual iOS device that you plan on using. If the wrong keyboard appears (for example, if there is no minus button available), you may supply an optional parameter to the plug-in to set the keyboard type manually.
36
59
37
60
| Parameter key | Parameter value |
38
61
| --- | --- |
39
62
|`ios-inputmode`| Possible values: `none`, `text`, `decimal`, `numeric`, `tel`, `search`, `email`, `url`. [Click here for more information about the inputmode attibute.](https://css-tricks.com/everything-you-ever-wanted-to-know-about-inputmode)|
40
63
41
-
## How to use
42
-
43
-
**To use this plug-in as-is**, just download the [baseline-integer.fieldplugin.zip](https://github.com/surveycto/baseline-integer/raw/master/baseline-integer.fieldplugin.zip) file from this repo, and attach it to your form.
44
-
45
-
To create your own field plug-in using this as a template, follow these steps:
46
-
47
-
1. Fork this repo
48
-
1. Make changes to the files in the `source` directory.
49
-
50
-
***Note:** be sure to update the `manifest.json` file as well.
51
-
52
-
1. Zip the updated contents of the `source` directory.
53
-
1. Rename the .zip file to *yourpluginname*.fieldplugin.zip (replace *yourpluginname* with the name you want to use for your plug-in).
54
-
1. You may then attach your new .fieldplugin.zip file to your form as normal.
0 commit comments