This field plug-in obtains the IP address of the device being used to fill out a SurveyCTO form. Once the IP address has been obtained, the form will automatically advance to the next field. You have the option to save either the actual IP address, or a hashed version of it (for enhanced privacy). See the Parameters section below.
This field plug-in uses the text
field type. The data is stored as you would expect from this field type without a field plug-in.
- Download the test form extras/sample-form from this repo and upload it to your SurveyCTO server.
- Download the get-ip-address.fieldplugin.zip file from this repo, and attach it to the test form on your SurveyCTO server.
- Make sure to provide the correct parameters (see below).
Key | Value |
---|---|
hash (optional) |
Set this to yes to save a 32-bit integer value instead of the actual IP address. |
Example:
In the online Form Designer, you can enterhash="yes"
in the Plug-in parameters box. If you are editing this form using a spreadsheet, entercustom-get-ip-address(hash="yes")
in the appearance column.
If no parameters are supplied, the actual IP address will be saved.
Feature / Property | Support |
---|---|
Supported field type(s) | text |
Default values | No |
Custom constraint message | Yes |
Custom required message | Yes |
Read only | No |
media:image | Yes |
media:audio | Yes |
media:video | Yes |
-
Test form
You can find a form definition in this repo here: extras/sample_form. -
Developer documentation
More instructions for developing and using field plug-ins can be found here: https://github.com/surveycto/Field-plug-in-resources