© 2024 IQVIA - All Rights Reserved
Formidable Forms Example
Overview
We previously had an informational website on the use of Gravity Forms (another Wordpress plugin) setup at the following location: https://volunteer-demo.clinspark.com/, but it is not currently active.
This is provided by Foundry Health without any guarantee that it will be complete or functional. We do not offer support for Wordpress integrations with our API, though many customers have done this successfully.
When using Wordpress, you can use the Formidable forms plugin to submit API data directly to Clinspark.
Formidable Forms – Contact Form Plugin, Survey, Quiz, Payment, Calculator Form & Custom Form Builder
It is as simple as setting up a form, and mapping form values to clinspark’s “/saveVolunteerRequest” and “/saveVolunteerStudyInterest” API endpoints
Differences between Recruitment API calls
The main difference between the saveVolunteerReqest and saveVolunteerStudyInterest is the specification of a study & optionally a cohort. But apart from that there are some other differences in what these API’s support. The latest version of Clinspark currently supports the following parameters:
field | saveVolunteerRequest | SaveVolunteerStudyInterest |
---|---|---|
abaAccount | Yes | Yes |
abaBank | Yes | Yes |
Address | Yes | Yes |
Allergies | Yes | No |
City | Yes | Yes |
Cohort (array) | No | Yes (see note on arrays) |
ContactableByEmailCampaign | Yes | No |
ContactableByPhone | Yes | No |
ContactableBySm | Yes | No |
ContactSource | Yes | No |
ContractceptionType | Yes | No |
Country | Yes | Yes |
dateOfBirth | Yes | Yes |
emailAddress | Yes | Yes |
externalId | Yes | No |
firstName | Yes | Yes |
genderMale | Yes | Yes |
generalPracticioner | Yes | Yes |
generalPracticionerAddress | Yes | Yes |
generalPracticionerPhoneNumber | Yes | Yes |
heightMeters | Yes | No |
homePhone | Yes | Yes |
ibanAccount | Yes | Yes |
ibanBank | Yes | Yes |
lastName | Yes | Yes |
middleName | Yes | Yes |
mobilePhone | Yes | Yes |
nameSuffix | Yes | No |
Nationality | Yes | No |
Notes | Yes | Yes |
nextOfKin | Yes | No |
otherRace | Yes | No |
phoneNotes | Yes | No |
postalCode | Yes | Yes |
preferredLanguage | Yes | No |
previousStudyParticipation | Yes | No |
Region | Yes | Yes |
requestSource | Yes | Yes |
studyName | No | Yes |
Title | Yes | Yes |
Vegetarian | Yes | No |
volunteerRaces (array) | Yes (see note on arrays) | No |
volunteerRequestAnswers (array) | Yes (see note on arrays) | No |
weightKilos | Yes | No |
WorkPhone | Yes | Yes |
For a full & updated list of arguments, please always refer to the latest Swagger documentation.
Arrays
Applies to the following arguments: VolunteerRaces, VolunteerRequestAnswers & Cohorts
Formidable Forms currently (as of writing, version 4.10.x) does not support submitting data as an array. For example, the ‘cohort’ argument in the saveVolunteerStudyInterest API expects an array, but whatever you define will end up as clear text in Clinspark.
Dates
Dates need to be submitted in a specific format to Clinspark. Formidable forms can support that date format by adding format=”Y-m-d” to the field specification.
Steps
Build a form in formidable forms
In settings > actions & notifications, add an action “Send API data”
Enter the following data:
Notification URL: https://[instance].clinspark.com/api/v1/saveVolunteerStudyInterest (or saveVolunteerRequest)
Basic Auth: [username]:[password] - where username is a user having the API role action assigned.
data format = json, method = POST
“trigger this action when” would usually be ‘when entry is created’
In the key/value list, add keys according to the clinspark API schema (cfr. swagger), and the values can be mapped to fields, or fixed values (e.g., ‘true’, … )
Try an entry - log files of the connection to the api can be found at your wordpress admin site > formidable > Logs - there you’ll find the full request & response, error codes etc.
Examples
Exported and Printed Copies Are Uncontrolled