Skip to content

Commit 73f6cdc

Browse files
authored
Merge pull request #7 from surveycto/develop
Develop
2 parents 19a63b8 + 3fb9c02 commit 73f6cdc

File tree

2 files changed

+35
-27
lines changed

2 files changed

+35
-27
lines changed

README.md

Lines changed: 35 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,44 @@
11
# Baseline integer field
22

3-
![](extras/baseline-integer.jpg)
3+
![Screenshot](extras/baseline-integer.jpg)
44

55
## Description
66

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.
88

99
[![Download now](extras/download-button.png)](https://github.com/surveycto/baseline-integer/raw/master/baseline-integer.fieldplugin.zip)
1010

11-
## Default SurveyCTO feature support
11+
### Features
12+
13+
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
1242

1343
| Feature / Property | Support |
1444
| --- | --- |
@@ -22,37 +52,15 @@ A simple replacement for the default integer field, plus a few improvements (see
2252
| media:video | Yes |
2353
| `show-formatted` appearance | No |
2454

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
3356

3457
**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.
3659

3760
| Parameter key | Parameter value |
3861
| --- | --- |
3962
| `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)|
4063

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.
55-
5664
## More resources
5765

5866
* **Test form**
-77 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)