get_form_items
Returns reservation form items for given resource (if resource_id is specified) or for the global form (if resource_id is not specified) or the all possible reservation forms of the site, including both the global form and resource-specific forms (if resource_id has the special value of -1).
resource_id int optional
Resource ID whose form items you want to get. If you skip this parameter, the global reservation form items will be returned. You can also use a special value
-1 which will include global form items as well as resource-specific reservation form items for all resources.
include_standard_fields bool optional
Set to
true in order to include standard fields (such as first/last name, address etc) or
false to include only custom fields added by you. The default value is
false. Note that either way the date/time fields will not be included
site_id int optional
ID of the site (required only for meta-sites when resource id is not specified)
method string required
must be set to
get_form_items language string optional
by specifying a 2-letter (ISO 639-1) language code (all capital letters e.g. EN, DE, FR, ES, IT) you can change the language of the text values returned
api_key string required
your API key -
Click here to get your key. If your API key uses a hash key, you must also include the parameters
hash_key and hash_timestamp.
items array
Array of form items. Each item is an array with the following keys: name (name with underscores instead of spaces and other non-alphanumeric characters), label (full name), type (1=dropdown list, 2=text item, 3=yes/no checkbox, 4=agreement, 5=textarea, 6=hidden/special use, 7=section, 8=custom HTML code, 9+=special fields), dropdown_values (comma-separated, used only for dropdown lists), default_value, is_required (true/false), description, resource_id (if the resource_id parameter was set to -1, this will be the resource_id given item belongs to in case it's resource-specific or null for the global form), is_custom_field (true if this is a custom added field or false if it's a default field)
Click here to test this function in the API playground.