Field | Type | Description |
object_type | string | "form" |
is_valid | True|False | True if this references a form or false if the form is null |
guid | guid | The unique identifier for this form |
redirect_url | url_field | |
template_override_guid | text_field | |
name | text_field | The entity name. This field is primarily intended for internal use by website administrators to identify objects. |
title | text_field | |
linked_title | html | A link to the form if it has a URL, or the escaped title if not. |
folder_guid | text_field | |
folder | folder | |
has_url | boolean | |
site_domain_guid | text_field | |
ssl_mode | text_field | |
include_in_search | boolean | |
url | text_field | |
template_guid | text_field | |
template | template | |
canonical_url | url_field | |
browser_title | text_field | |
meta_description | textarea_field | |
meta_robots | textarea_field | |
keywords | textarea_field | |
full_url | string | The full URL of the page - including the scheme ("http://", "https://" or just "//"), the domain name, and the path. |
visited | true/false | Whether or not the user has visited the form before in their current session. Note that this will always be false if the user has not allowed session permission (see the Permissions and Personalization documentation). |
custom | varies | Each form includes all of the custom properties defined by the template. |
form_unique_identifier | string | A helper property containing a unique ID for this instance of this form. Every time this form is output - either from this instance or from multiple instances - it should have a different ID. Specifically, every time the FormEnd property is accessed the unique ID will be reset to a new value (thereby preventing conflicting javascript code and element identifiers). |
form_start | html | A helper property to assist in creating the form markup. This property includes the form tag with the form_unique_identifier. |
form_end | html | A helper property to assist in creating the form markup. This property includes the end form tag as well as some javascript that will be used to assist in processing conditional fields, form validation, and form submissions. |
javascript | string | A helper property to assist in creating the form markup. This property includes all of the javascript that will be output from the form_end property. USE WITH CAUTION. |
javascript_field_config | string | A helper property to assist in creating the form markup. This property includes the field configurations for the javascript that will be output from the javascript property. USE WITH CAUTION. |
javascript_form_config | string | A helper property to assist in creating the form markup. This property includes the form configuration for the javascript that will be output from the javascript property. USE WITH CAUTION. |
form_submit_target | string | A helper property in case you decide to build and submit the form without using the form_start and form-end properties. This property contains the URL that the form must be submitted to in order to be recorded by Marketpath CMS as a form submission. |
fields | list | A list containing all of the form fields that are direct children of the current form. Note that any fields (or groups) that are part of a parent group will NOT be included in this list - they will be included as children of their parent group. |
value | string | Synonymn for guid |
output | html | The default output that the form produces when output directly to the template. |
output_in_list | html | The default output that the form produces when output directly to the template as part of a list. |
Contains multiple forms.
Field | Type | Description |
object_type | string | "forms" |
is_valid | true/false | true if this contains at least one form |
prepended | list of forms | forms that will be listed at the beginning of the items list |
fetched | list of forms | The primary list of forms to be included in the items list |
appended | list of forms | forms that will be listed at the end of the items list |
appended_unique | list of forms | forms that will be listed at the end of the items list, excluding any forms that are already included in either the prepended or fetched lists |
items | list of forms | The full list of forms in the proper order and uniqueness, including prepended, fetched, and appended forms |
size | number | The total number of items in the list of items, including prepended, fetched, and appended forms |
limit | number | The maximum number of forms that could have been fetched dynamically from the database |
start | number | The 1-based index of the first form that was (or would have been) dynamically fetched from the database |
page | number | The 1-based index of the first "page" of forms that could have been fetched dynamically from the database - as determined by the start and limit properties |
total_count | number | The total number of forms in the database that matched the provided filter parameters when fetching the list of fetched forms |
total_pages | number | The total number of "pages" of results that matched the provided filter parameters when fetching the list of fetched forms - as determined by the total_count and limit properties |
output | html | The default output that the forms will produce when it is output directly to the template - using the "output_in_list" property of each form in the items list |
Fetch a single form.
{% form[var|set|assign] new_variable_nameSpecify a variable name in order to save the form to a variable. If not specified the form will be output to the template instead. The variable will be saved using the "var" behavior unless "set" or "assign" are specified.output_to_templateIf included, the form will be output directly to the template.=form|guid|string%}
Fetch a list of forms.
{% forms[var|set|assign] new_variable_nameSpecify a variable name in order to save the results to a variable. If not specified the results will be output to the template instead. The variable will be saved using the "var" behavior unless "set" or "assign" are specified.output_to_templateIf included, the results will be output directly to the template.=prepend:form|forms|guid|stringPrepend the specified forms before the fetched results. All prepended input will be returned in the same order that it is input.append:form|forms|guid|stringAppend the specified forms after the fetched results. All appended input will be returned in the same order that it is input.exclude:form|forms|guid|stringPrevent the specified forms from being included in the fetched results. Has no affect on prepended and appended formsexclude_prepended:trueSpecifically exclude all prepended forms from the fetched results. If "unique:true" is specified this is the default behavior, although you may also specify "exclude_prepended:false" to allow any prepended items to be fetched along with other results anyway.exclude_appended:trueSpecifically exclude all appended forms from the fetched results. This is false by default - even if "unique:true" is specified - so that results are returned in the proper order.unique:trueIf set to true, each of the resulting lists (prepended, fetched, appended, and items) will be unique, although there may be duplicates between the prepended, fetched, and appended lists. The "items" list will include objects in the order in which they appear - with prepended items first, then fetched items, then appended items.max_size:25If specified, then the "items" list will only include up to the specified number of forms. The "limit" may be automatically lowered to only fetch the maximum number of forms that will be included in "items" following prepended items. Note that this may also impact both the "page and "total_pages" values. In order to use pagination with a list loaded using "max_size" use "start" instead of "page" and "limit".filter:stringOnly return forms that match the given string filterhas_url:booleanFilter results to only return forms for which has_url exactly matches the specified value.template:template|templates|guid|stringOnly return forms with one of these templatesinclude_in_search:booleanFilter results to only return forms for which include_in_search exactly matches the specified value.site_domain_guid:guidFilter results to only return forms for which site_domain_guid exactly matches the specified value.ssl_mode:stringFilter results to only return forms for which ssl_mode exactly matches the specified value.folder:folder|folders|guid|stringOnly return forms with one of these foldersdate_created_start:datetimeFilter results to return forms for which date_created is greater than or equal to date_created_start.date_created_end:datetimeFilter results to return forms for which date_created is less than or equal to date_created_end.start:1Set the 1-based index of the first form to fetch.page:1Automatically calculate the first form to fetch based on both of the "limit" and the 1-based "page" value. Ignored if "start" is set.limit:25Defines the maximum number of forms to be fetched. If not included, this will default to 10. Note that if "max_size" is specified then "limit" may be automatically lowered even if specified.sort_by:"date_created"Specify which field to sort the fetched results by. Has no affect on prepended or appended forms.
By default results will be sorted by relevance if there is a filter string and date_created (the date the item was first published) desc (newest first) if not.
Other Options include:
- Name
- Title
- URL
- BrowserTitle
- relevance (based on which field matches the given filter and where in the field the match is found. When sorting by relevance sort_direction is irrelevant)
- date_created (Equivalent to the date you first published this item. Unpublishing and republishing the item resets date_created to the current date)
- random (By default using random sorting prevents fast caching of the page. Setting "cache_random:true" overrides this behavior and allows the page to be fast-cached anyway)
sort_direction:"desc"Specify whether the fetched results should be sorted in asc (ascending) or desc (descending) order.%}
If you do not include any filters or inputs other than prepended items, appended items, or max_size, then no additional items will be fetched. If you wish to fetch all items you must include at least one additional input (ie: "start:1")