Web Links
Many websites currently offer services that Collection Managers find useful when entering or evaluating data within a collection. Specify allows you to add buttons to forms that can take you to different websites.
Here’s an example of the email Web Link in the Agent forms:
The
Web Link
file it looks like this:The form definition it looks like this:
<cell type="field" id="mailto" name="this" uitype="plugin" initialize="name=WebLinkButton;weblink=MailTo;icon=EMail;watch=7"/>
More information on Web Links and editing forms can be found here: Editing Forms under WebLinkButton
Creating a Web Link
To create a Web Link you’ll want to start by navigating to the User Tools menu, then go to App Resources
From here, you want to make sure you can see App Resources (by clicking the big App Resources button at the top of the page), then navigate to the Web Links
file that applies to your current discipline or collection. In this case, I am editing the file under the Ichthyology collection.
If you would like to add a new Web Link you will click on Add and get this dialog:
From here you need to come up with a Web Link name that is unique to your collection and you will want to write a description for what this Web Link does (you do not have to write a description but we recommend it).
Next you’ll want to decide if you want the web link to be linked to a table/field. If you want it to be linked to a table under the
Table
section you will open the drop down menu and select the table you want.
Definitions
URL Part
First you will want to add a definition with the URL part
. You’ll start by clicking Add under Definition
which will add the URL Part
definition and then you can paste your URL into the box.
Field
If you want the Web Link to be linked to a specific field first you will need to make sure you have a table selected at the top, then you will add another definition and select Field
from that dropdown menu. A Field link sends values from an existing field to a web service, causing it to open to a specific page based on those values.
For example, the email Web Link is linked to the agent table and the email field.
This Field
The ‘This Field’ definition is how the web link is defined in the form definition and the schema config. Rather than typing the name of a field into the form definition you will type <this>
. This link is useful when a field for required link information is not included in the schema config. This link would require that a field and button are added to the form. You will type the information into the field, then click the button to launch the site based on the data you typed in.
When creating a web link using the Field Format type you will also have to add the web link to the schema config. Once the web link is created it will be added to a picklist under the Web Links
section and must be selected to be linked to the field.
Formatted Resource
The Formatted Resource
definition needs to be linked to a table and will add the default Table Format at the end. In this case it will add the default table format for agent which is ‘last name, first name’
In any case where there are multiple table formats for a given table there will be a picklist to choose from.
Form Definition
Once your web link is created you will need to add it into your form definition.
Note: If you have not done form edits before you should check out Editing Forms for more information on how the form definitions work. There is an example of a WebLinkButton along with definitions on terminology and generally how things work.
In app resources click on the big Form Definitions button at the top of the screen. After that you should see the .views
(e.g. fish.views) files and you will need to click on the one for your collection. Once there you just need to select the table that you want to add the web link to and then add in the XML code for it where ever you want it.
Example
Here’s an example Web Link:
And here’s how it looks in the visual editor:
In this example it is not linked to any table or field so I just added it to the top of the agent form.