Setting up a recording form for a local nature reserve
------------------------------------------------------
.. note::
This page needs further work!
.. sidebar:: Prerequisites
Before following this tutorial you need a website running Drupal 7 or 8 with the
IForm module installed.
This tutorial guides you through the steps required to add a recording form for a local
nature reserve to a Drupal website. We are going to follow through the addition of a
recording form for the Wort's Meadow nature reserve to iRecord as a worked example. The
form will then be available as part of the library of forms on the site as well as having
it's own URL for registration of new users.
Setting up the initial form
^^^^^^^^^^^^^^^^^^^^^^^^^^^
* First, log into the warehouse. You will need site admin rights to the website
that you are adding the survey to.
* Select **Lookup Lists > Surveys** from the menu. Click the **New Survey**
button at the bottom of the page. Set the following values:
* **Title** = Friends of Worts Meadow LNR
* **Description** = A survey for recording at Worts Meadow on iRecord
* **Website** = iRecord
* Setup any additional attributes required that don't already exist in the list
of custom attributes. We need one called Worts Meadow Site, with an associated
termlist containing the options Bourne Wood, The meadows, The moat, Field
Pond, Other ponds/ditches. So, first create the termlist then the terms, then
add an attribute, ticking the "Applies to Location" box. Use the Setup
attributes page to configure the attributes.
* Log into the Drupal site with admin rights, or at least enough rights
to setup new Indicia forms. In our case we log into iRecord.
* Find out the latitude and longitude of the centre of the site. Worts Meadow is
at TL47426507 so I used the site at http://www.nearby.org.uk/coord.cgi#OSGB36%20Grid%20Reference
to calculate the lat long, which is 52.264039, 0.158773.
* Select Content management > Create content > Indicia Pages from the admin menu.
* Set the following values on the form:
* **Page title** - Worts Meadow Record List
* **Select Form Category** - Data entry forms
* **Select Form** - Enter a single record or list of records (customisable)
* Then, click the **Load Settings Form** button. Set the following options on
the form that appears:
* **Other IForm Parameters**
* **View access control** - ticked. This causes the form to use Drupal
permissions to determine who can access it.
* **Permission name for view access control** - "online recording". Anyone
who has the online recording permission can access the form. This allows
us to setup exactly who can do online recording.
* **Survey** - "Friends of Worts Meadow LNR". Defines the survey that the
records will be saved against.
* **Display notification after save** - ticked. This causes the form to
display a message thanking the user for the records after saving. An
alternative would be to set the **Redirect to page after successful data
entry** to a custom page which acknowledges the submission.
* **Initial Map View**
* **Centre of Map Latitude** - 52.264039
* **Centre of Map Longitude** - 0.158773
* **Map Zoom Level** - 10 (this is a guess, if wrong I can re-edit the
form and tweak it).
* **Map Height** - 550
* **Base Map Layers**
* **Google Hybrid** - ticked
* **Other Map Settings**
* **Controls to add to map** - layerSwitcher + panZoomBar (separate lines)
* **Allowed Spatial Ref Systems** - OSGB
* **User Interface**
* **Interface Style Option** - Tabs
* **Client Side Validation** - ticked
* **Skip initial grid of data** - ticked
* **Species**
* **Extra Species List** - UK Master List
* **User can filter the Extra Species List** - ticked
* **Cache lookups** - ticked
* **Include both naes in species controls and added rows** - ticked
* **Include taxon group name in species autocomplete and added rows** -
ticked
* **Occurrrence Comment** - ticked
* **Occurrence Images** - ticked
* **Species Names Filter** - Allow common names or preferred latin names.
* **Forms and surveys library settings**
* **Include in library** - ticked
* **Library title** - Friends of Worts Meadow LNR
* **Library description** - A recording form for Worts Meadow in Cambridgeshire
* **Locations** - Cambridgeshire
* **Registration Path** - register-worts-meadow
* **Registration intro** - Welcome to the online record submission facility
for Worts Meadow. Before submitting your records, please register using
the form below.
* **Url Path Settings**
* enter-worts-meadow-records
Now, save the form. There are a couple of things still to do, including getting
the form layout right and setting the map zoom.
Setting up the form structure
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* **Form Structure** - paste the following text in::
=About you=
[*]
@smpAttr:36|helpText=Please provide your first name
@smpAttr:36|class=control-width-5
@smpAttr:58|helpText=Please provide your surname
@smpAttr:58|class=control-width-5
@smpAttr:8|helpText=Please provide your email. This will only be used to contact you if we require further information to verify the record.
@smpAttr:8|class=control-width-5
=Species=
[date]
@class=control-width-4
@lockable=true
[*]
@smpAttr:127|class=control-width-5
@smpAttr:127|default={profile_last_name}, {profile_first_name}
@smpAttr:127|helpText=Enter the recorder's name, if different.
@smpAttr:127|lockable=true
?Please enter all the species you saw at one site on a single day and any other information about them. Then move to the When and where was it? tab before submitting your records.?
[species]
@resizeWidth=1500
@resizeHeight=1500
@occAttr:18|default={profile_last_name}, {profile_first_name}
@helpText=Use * as a wildcard when searching for species names.
[species attributes]
=Place=
[spatial reference]
@lockable=true
@class=control-width-4
@label=Enter a spatial reference
Or simply click on your position on the map