Add gravity flow demo

This commit is contained in:
Almira Krdzic
2018-06-28 10:02:07 +02:00
parent 1b5076bf2f
commit 12a5066018
1106 changed files with 317603 additions and 4720 deletions

View File

@@ -0,0 +1,319 @@
{
"0": {
"title": "0001 Conditional Field",
"description": "Conditional field",
"labelPlacement": "top_label",
"descriptionPlacement": "below",
"button": {
"type": "text",
"text": "Submit",
"imageUrl": ""
},
"fields": [
{
"type": "radio",
"id": 1,
"label": "Radio box",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"choices": [
{
"text": "First Choice",
"value": "First Choice",
"isSelected": false,
"price": ""
},
{
"text": "Second Choice",
"value": "Second Choice",
"isSelected": false,
"price": ""
},
{
"text": "Third Choice",
"value": "Third Choice",
"isSelected": false,
"price": ""
}
],
"formId": 5,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"conditionalLogic": "",
"failed_validation": "",
"productField": "",
"enableOtherChoice": "",
"enablePrice": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false
},
{
"type": "text",
"id": 2,
"label": "Text conditional for second choise",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": 5,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": {
"actionType": "show",
"logicType": "all",
"rules": [
{
"fieldId": "1",
"operator": "is",
"value": "First Choice"
}
]
},
"failed_validation": "",
"productField": "",
"enablePasswordInput": "",
"maxLength": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false
},
{
"type": "select",
"id": 3,
"label": "Select box",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"choices": [
{
"text": "First Choice",
"value": "First Choice",
"isSelected": false,
"price": ""
},
{
"text": "Second Choice",
"value": "Second Choice",
"isSelected": false,
"price": ""
},
{
"text": "Third Choice",
"value": "Third Choice",
"isSelected": false,
"price": ""
}
],
"formId": 5,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"conditionalLogic": {
"actionType": "show",
"logicType": "all",
"rules": [
{
"fieldId": "1",
"operator": "is",
"value": "Second Choice"
}
]
},
"failed_validation": "",
"productField": "",
"enablePrice": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false
},
{
"type": "number",
"id": 4,
"label": "Number",
"adminLabel": "",
"isRequired": true,
"size": "medium",
"errorMessage": "",
"inputs": null,
"numberFormat": "decimal_dot",
"formId": 5,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": {
"actionType": "show",
"logicType": "all",
"rules": [
{
"fieldId": "3",
"operator": "is",
"value": "Second Choice"
}
]
},
"enableCalculation": false,
"rangeMin": "",
"failed_validation": "",
"productField": "",
"rangeMax": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false
}
],
"version": "2.0.6.3",
"id": 5,
"useCurrentUserAsAuthor": true,
"postContentTemplateEnabled": false,
"postTitleTemplateEnabled": false,
"postTitleTemplate": "",
"postContentTemplate": "",
"lastPageButton": null,
"pagination": null,
"firstPageCssClass": null,
"confirmations": [
{
"id": "57b705c10c4e8",
"name": "Default Confirmation",
"isDefault": true,
"type": "message",
"message": "Thanks for contacting us! We will get in touch with you shortly.",
"url": "",
"pageId": "",
"queryString": ""
}
],
"notifications": [
{
"id": "57b705c10bf96",
"to": "{admin_email}",
"name": "Admin Notification",
"event": "form_submission",
"toType": "email",
"subject": "New submission from {form_title}",
"message": "{all_fields}"
}
],
"feeds": {
"gravityflow": [
{
"id": "10",
"form_id": "5",
"is_active": "1",
"feed_order": "0",
"meta": {
"step_name": "Conditional field submited",
"description": "",
"step_type": "notification",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": [],
"scheduled": "0",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "",
"schedule_delay_unit": "hours",
"schedule_date_field_offset": "0",
"schedule_date_field_offset_unit": "hours",
"schedule_date_field_before_after": "after",
"notification_id_57b705c10bf96": "0",
"workflow_notification_enabled": "0",
"workflow_notification_type": "select",
"workflow_notification_routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"workflow_notification_from_name": "",
"workflow_notification_from_email": "{admin_email}",
"workflow_notification_reply_to": "",
"workflow_notification_bcc": "",
"workflow_notification_subject": "",
"workflow_notification_message": "",
"workflow_notification_disable_autoformat": "0",
"destination_complete": "complete"
},
"addon_slug": "gravityflow"
}
]
}
},
"version": "2.0.6.3"
}

View File

@@ -0,0 +1,337 @@
{
"0": {
"title": "0003 Dynamic Assignee Routing",
"description": "",
"labelPlacement": "top_label",
"descriptionPlacement": "below",
"button": {
"type": "text",
"text": "Submit",
"imageUrl": ""
},
"fields": [
{
"type": "text",
"id": 1,
"label": "Single Line",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"inputMask": false,
"inputMaskValue": "",
"allowsPrepopulate": false,
"formId": 10,
"description": "",
"inputType": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": ""
},
{
"type": "textarea",
"id": 2,
"label": "Paragraph",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"inputMask": false,
"inputMaskValue": "",
"allowsPrepopulate": false,
"formId": 10,
"description": "",
"inputType": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": ""
},
{
"type": "checkbox",
"id": 3,
"label": "Publishers",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"choices": [
{
"text": "Publisher 1",
"value": "publisher1",
"isSelected": false,
"price": ""
},
{
"text": "Publisher 2",
"value": "publisher2",
"isSelected": false,
"price": ""
},
{
"text": "Publisher 3",
"value": "publisher3",
"isSelected": false,
"price": ""
},
{
"text": "Publisher 4",
"value": "publisher4",
"isSelected": false,
"price": ""
}
],
"inputs": [
{
"id": "3.1",
"label": "Publisher 1",
"name": ""
},
{
"id": "3.2",
"label": "Publisher 2",
"name": ""
},
{
"id": "3.3",
"label": "Publisher 3",
"name": ""
},
{
"id": "3.4",
"label": "Publisher 4",
"name": ""
}
],
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"inputMask": false,
"inputMaskValue": "",
"allowsPrepopulate": false,
"enableChoiceValue": true,
"formId": 10,
"description": "",
"inputType": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"conditionalLogic": ""
}
],
"version": "1.9.14.30",
"id": 10,
"useCurrentUserAsAuthor": true,
"postContentTemplateEnabled": false,
"postTitleTemplateEnabled": false,
"postTitleTemplate": "",
"postContentTemplate": "",
"lastPageButton": null,
"pagination": null,
"firstPageCssClass": null,
"confirmations": [
{
"id": "56598179e72f2",
"name": "Default Confirmation",
"isDefault": true,
"type": "message",
"message": "Thanks for contacting us! We will get in touch with you shortly.",
"url": "",
"pageId": "",
"queryString": ""
}
],
"notifications": [
{
"id": "56598179e6a4f",
"to": "{admin_email}",
"name": "Admin Notification",
"event": "form_submission",
"toType": "email",
"subject": "New submission from {form_title}",
"message": "{all_fields}"
}
],
"feeds": {
"gravityflow": [
{
"id": "25",
"form_id": "10",
"is_active": "1",
"meta": {
"step_name": "User Input",
"description": "",
"step_type": "user_input",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": [],
"scheduled": "0",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "",
"schedule_delay_unit": "hours",
"type": "routing",
"routing": [
{
"target": false,
"fieldId": "3",
"operator": "is",
"value": "publisher1",
"type": false,
"assignee": "user_id|2",
"editable_fields": [
"1",
"2",
"3"
]
},
{
"target": false,
"fieldId": "3",
"operator": "is",
"value": "publisher2",
"type": false,
"assignee": "user_id|3",
"editable_fields": [
"1",
"2",
"3"
]
},
{
"target": false,
"fieldId": "3",
"operator": "is",
"value": "publisher3",
"type": false,
"assignee": "user_id|4",
"editable_fields": [
"1",
"2",
"3"
]
},
{
"target": false,
"fieldId": "3",
"operator": "is",
"value": "publisher4",
"type": false,
"assignee": "user_id|5",
"editable_fields": [
"1",
"2",
"3"
]
},
{
"target": false,
"fieldId": "3",
"operator": "is",
"value": "publisher1",
"type": false,
"assignee": "user_id|1",
"editable_fields": [
"1",
"2",
"3"
]
},
{
"target": false,
"fieldId": "3",
"operator": "is",
"value": "publisher2",
"type": false,
"assignee": "user_id|1",
"editable_fields": [
"1",
"2",
"3"
]
},
{
"target": false,
"fieldId": "3",
"operator": "is",
"value": "publisher3",
"type": false,
"assignee": "user_id|1",
"editable_fields": [
"1",
"2",
"3"
]
}
],
"assignee_policy": "all",
"instructionsEnable": "1",
"instructionsValue": "<span style=\"color: #ff0000;\">Some instructions<\/span>",
"display_fields_mode": "all_fields",
"default_status": "in_progress",
"note_mode": "not_required",
"assignee_notification_enabled": "1",
"assignee_notification_from_name": "",
"assignee_notification_from_email": "{admin_email}",
"assignee_notification_reply_to": "",
"assignee_notification_bcc": "",
"assignee_notification_subject": "New Newstand Issue",
"assignee_notification_message": "A new entry requires your input\r\n\r\n{workflow_entry_link}",
"resend_assignee_emailEnable": "0",
"resend_assignee_emailValue": "7",
"expiration": "0",
"expiration_type": "delay",
"expiration_date": "",
"expiration_delay_offset": "",
"expiration_delay_unit": "hours",
"destination_complete": "next"
},
"addon_slug": "gravityflow",
"order": "0",
"feed_order": "0"
}
]
}
},
"version": "2.0.7.14"
}

View File

@@ -0,0 +1,605 @@
{
"0": {
"title": "0004 Dynamically Pre Populate Fields",
"description": "",
"labelPlacement": "top_label",
"descriptionPlacement": "below",
"button": {
"type": "text",
"text": "Submit",
"imageUrl": ""
},
"fields": [
{
"type": "product",
"id": 1,
"label": "Product Name",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": [
{
"id": "1.1",
"label": "Name",
"name": "prodname"
},
{
"id": "1.2",
"label": "Price",
"name": "prodprice"
},
{
"id": "1.3",
"label": "Quantity",
"name": ""
}
],
"inputType": "singleproduct",
"enablePrice": null,
"formId": 1,
"description": "",
"allowsPrepopulate": true,
"inputMask": false,
"inputMaskValue": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"failed_validation": "",
"productField": "",
"basePrice": "$20.00",
"disableQuantity": false,
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"displayAllCategories": false,
"useRichTextEditor": false,
"displayOnly": ""
},
{
"type": "quantity",
"id": 2,
"label": "Quantity",
"adminLabel": "",
"isRequired": true,
"size": "medium",
"errorMessage": "",
"inputType": "number",
"productField": 1,
"numberFormat": "decimal_dot",
"formId": 1,
"description": "",
"allowsPrepopulate": true,
"inputMask": false,
"inputMaskValue": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "quant",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"inputs": "",
"choices": "",
"conditionalLogic": "",
"enableCalculation": false,
"rangeMin": "1",
"failed_validation": "",
"rangeMax": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false,
"displayOnly": ""
},
{
"type": "option",
"id": 3,
"label": "Option",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputType": "checkbox",
"choices": [
{
"text": "First Option",
"value": "First Option",
"isSelected": false,
"price": "$3.00"
},
{
"text": "Second Option",
"value": "Second Option",
"isSelected": false,
"price": "$4.00"
},
{
"text": "Third Option",
"value": "Third Option",
"isSelected": false,
"price": "$5.00"
}
],
"enablePrice": true,
"productField": 1,
"formId": 1,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"inputs": [
{
"id": "3.1",
"label": "First Option",
"name": ""
},
{
"id": "3.2",
"label": "Second Option",
"name": ""
},
{
"id": "3.3",
"label": "Third Option",
"name": ""
}
],
"conditionalLogic": "",
"failed_validation": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false,
"displayOnly": ""
},
{
"type": "total",
"id": 5,
"label": "Total",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": 1,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"failed_validation": "",
"productField": "",
"displayOnly": ""
},
{
"type": "page",
"id": 7,
"label": "",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"displayOnly": true,
"nextButton": {
"type": "text",
"text": "Next",
"imageUrl": ""
},
"previousButton": {
"type": "text",
"text": "Previous",
"imageUrl": ""
},
"formId": 1,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": {
"actionType": "show",
"logicType": "all",
"rules": [
{
"fieldId": "2",
"operator": ">",
"value": "1"
}
]
},
"failed_validation": "",
"productField": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false
},
{
"type": "workflow_discussion",
"id": 6,
"label": "Discussion",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": 1,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"failed_validation": "",
"productField": "",
"form_id": "",
"useRichTextEditor": false,
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"displayOnly": ""
},
{
"type": "workflow_user",
"id": 8,
"label": "User",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": 1,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": [
{
"value": "1",
"text": "admin"
},
{
"value": "2",
"text": "First admin1"
},
{
"value": "3",
"text": "First admin2"
},
{
"value": "4",
"text": "First admin3"
}
],
"conditionalLogic": "",
"failed_validation": "",
"productField": "",
"enablePrice": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false,
"displayOnly": ""
}
],
"version": "2.0.6.3",
"id": 1,
"useCurrentUserAsAuthor": true,
"postContentTemplateEnabled": false,
"postTitleTemplateEnabled": false,
"postTitleTemplate": "",
"postContentTemplate": "",
"lastPageButton": {
"type": "text",
"text": "Previous",
"imageUrl": ""
},
"pagination": {
"type": "percentage",
"pages": [
"",
""
],
"style": "blue",
"backgroundColor": null,
"color": null,
"display_progressbar_on_confirmation": false,
"progressbar_completion_text": null
},
"firstPageCssClass": "",
"confirmations": [
{
"id": "57bc5525c7d89",
"name": "Default Confirmation",
"isDefault": true,
"type": "message",
"message": "Thanks for contacting us! We will get in touch with you shortly.",
"url": "",
"pageId": "",
"queryString": ""
}
],
"notifications": [
{
"id": "57bc5525c7980",
"to": "{admin_email}",
"name": "Admin Notification",
"event": "form_submission",
"toType": "email",
"subject": "New submission from {form_title}",
"message": "{all_fields}"
}
],
"feeds": {
"gravityflow": [
{
"id": "1",
"form_id": "1",
"is_active": "1",
"feed_order": "0",
"meta": {
"step_name": "Validate inserted values",
"description": "",
"step_type": "user_input",
"feed_condition_conditional_logic": "1",
"feed_condition_conditional_logic_object": {
"conditionalLogic": {
"actionType": "show",
"logicType": "all",
"rules": [
{
"fieldId": "8",
"operator": "isnot",
"value": "1"
}
]
}
},
"scheduled": "0",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "",
"schedule_delay_unit": "hours",
"schedule_date_field_offset": "0",
"schedule_date_field_offset_unit": "hours",
"schedule_date_field_before_after": "after",
"type": "select",
"assignees": [
"assignee_user_field|8"
],
"editable_fields": [
"2",
"3"
],
"routing": "",
"conditional_logic_editable_fields_enabled": "0",
"highlight_editable_fields_enabled": "0",
"highlight_editable_fields_class": "green-triangle",
"assignee_policy": "all",
"instructionsEnable": "0",
"instructionsValue": "",
"display_fields_mode": "all_fields",
"display_order_summary": "1",
"default_status": "hidden",
"note_mode": "not_required",
"assignee_notification_enabled": "1",
"assignee_notification_from_name": "",
"assignee_notification_from_email": "{admin_email}",
"assignee_notification_reply_to": "",
"assignee_notification_bcc": "",
"assignee_notification_subject": "",
"assignee_notification_message": "A new entry requires your input",
"assignee_notification_disable_autoformat": "0",
"resend_assignee_emailEnable": "0",
"resend_assignee_emailValue": "7",
"expiration": "0",
"expiration_type": "delay",
"expiration_date": "",
"expiration_delay_offset": "",
"expiration_delay_unit": "hours",
"status_expiration": "complete",
"destination_expired": "next",
"destination_complete": "next"
},
"addon_slug": "gravityflow"
},
{
"id": "2",
"form_id": "1",
"is_active": "1",
"feed_order": "0",
"meta": {
"step_name": "Approve order",
"description": "",
"step_type": "approval",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": [],
"scheduled": "0",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "",
"schedule_delay_unit": "hours",
"schedule_date_field_offset": "0",
"schedule_date_field_offset_unit": "hours",
"schedule_date_field_before_after": "after",
"type": "select",
"assignees": [
"user_id|1"
],
"routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"unanimous_approval": "",
"instructionsEnable": "0",
"instructionsValue": "Instructions: please review the values in the fields below and click on the Approve or Reject button",
"display_fields_mode": "all_fields",
"display_order_summary": "1",
"assignee_notification_enabled": "1",
"assignee_notification_from_name": "",
"assignee_notification_from_email": "{admin_email}",
"assignee_notification_reply_to": "",
"assignee_notification_bcc": "",
"assignee_notification_subject": "",
"assignee_notification_message": "A new entry is pending your approval. Please check your Workflow Inbox.",
"assignee_notification_disable_autoformat": "0",
"resend_assignee_emailEnable": "0",
"resend_assignee_emailValue": "7",
"rejection_notification_enabled": "1",
"rejection_notification_type": "select",
"rejection_notification_users": [
"user_id|2",
"user_id|3",
"user_id|4"
],
"rejection_notification_routing": "",
"rejection_notification_from_name": "",
"rejection_notification_from_email": "{admin_email}",
"rejection_notification_reply_to": "",
"rejection_notification_bcc": "",
"rejection_notification_subject": "",
"rejection_notification_message": "Entry {entry_id} has been rejected",
"rejection_notification_disable_autoformat": "0",
"approval_notification_enabled": "1",
"approval_notification_type": "routing",
"approval_notification_routing": [
{
"target": false,
"fieldId": "3",
"operator": "is",
"value": "First Option",
"type": false,
"assignee": "user_id|2"
},
{
"target": false,
"fieldId": "3",
"operator": "is",
"value": "Second Option",
"type": false,
"assignee": "user_id|3"
},
{
"target": false,
"fieldId": "3",
"operator": "is",
"value": "Third Option",
"type": false,
"assignee": "user_id|4"
}
],
"approval_notification_from_name": "",
"approval_notification_from_email": "{admin_email}",
"approval_notification_reply_to": "",
"approval_notification_bcc": "",
"approval_notification_subject": "",
"approval_notification_message": "Entry {entry_id} has been approved",
"approval_notification_disable_autoformat": "0",
"revertEnable": "0",
"revertValue": "1",
"note_mode": "not_required",
"expiration": "0",
"expiration_type": "delay",
"expiration_date": "",
"expiration_delay_offset": "",
"expiration_delay_unit": "hours",
"status_expiration": "rejected",
"destination_expired": "next",
"destination_rejected": "complete",
"destination_approved": "complete"
},
"addon_slug": "gravityflow"
}
]
}
},
"version": "2.0.6.3"
}

View File

@@ -0,0 +1,253 @@
{
"0": {
"title": "0005 File Upload User Input",
"description": "",
"labelPlacement": "top_label",
"descriptionPlacement": "below",
"button": {
"type": "text",
"text": "Submit",
"imageUrl": ""
},
"fields": [
{
"type": "text",
"id": 1,
"label": "Single Line Text",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": 125,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"failed_validation": "",
"productField": "",
"enablePasswordInput": "",
"maxLength": "",
"displayOnly": "",
"enablePrice": ""
},
{
"type": "fileupload",
"id": 2,
"label": "Single File",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": 125,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": true,
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"maxFileSize": "",
"maxFiles": "1",
"multipleFiles": false,
"allowedExtensions": "",
"failed_validation": "",
"productField": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false,
"displayOnly": "",
"enablePrice": ""
},
{
"type": "radio",
"id": 3,
"label": "Radio Buttons",
"adminLabel": "",
"isRequired": true,
"size": "medium",
"errorMessage": "",
"inputs": null,
"choices": [
{
"text": "Select one",
"value": "",
"isSelected": false,
"price": ""
},
{
"text": "First Choice",
"value": "First Choice",
"isSelected": false,
"price": ""
},
{
"text": "Second Choice",
"value": "Second Choice",
"isSelected": false,
"price": ""
},
{
"text": "Third Choice",
"value": "Third Choice",
"isSelected": false,
"price": ""
}
],
"formId": 125,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": true,
"noDuplicates": false,
"defaultValue": "",
"conditionalLogic": "",
"failed_validation": "",
"productField": "",
"enableOtherChoice": "",
"enablePrice": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false,
"enableChoiceValue": true,
"displayOnly": ""
}
],
"version": "2.0.7.1",
"id": 125,
"useCurrentUserAsAuthor": true,
"postContentTemplateEnabled": false,
"postTitleTemplateEnabled": false,
"postTitleTemplate": "",
"postContentTemplate": "",
"lastPageButton": null,
"pagination": null,
"firstPageCssClass": null,
"confirmations": [
{
"id": "57dadfe1c9ca1",
"name": "Default Confirmation",
"isDefault": true,
"type": "message",
"message": "Thanks for contacting us! We will get in touch with you shortly.",
"url": "",
"pageId": "",
"queryString": ""
}
],
"notifications": [
{
"id": "57dadfe1c9a1b",
"to": "{admin_email}",
"name": "Admin Notification",
"event": "form_submission",
"toType": "email",
"subject": "New submission from {form_title}",
"message": "{all_fields}",
"isActive": false
}
],
"feeds": {
"gravityflow": [
{
"id": "240",
"form_id": "125",
"is_active": "1",
"meta": {
"step_name": "User Input",
"description": "",
"step_type": "user_input",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": [],
"scheduled": "0",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "",
"schedule_delay_unit": "hours",
"schedule_date_field_offset": "0",
"schedule_date_field_offset_unit": "hours",
"schedule_date_field_before_after": "after",
"type": "select",
"assignees": [
"user_id|1"
],
"editable_fields": [
"1",
"2",
"3"
],
"routing": "",
"highlight_editable_fields_enabled": "0",
"highlight_editable_fields_class": "green-triangle",
"assignee_policy": "all",
"instructionsEnable": "0",
"instructionsValue": "",
"display_fields_mode": "all_fields",
"default_status": "hidden",
"note_mode": "not_required",
"assignee_notification_enabled": "1",
"assignee_notification_from_name": "",
"assignee_notification_from_email": "{admin_email}",
"assignee_notification_reply_to": "",
"assignee_notification_bcc": "",
"assignee_notification_subject": "",
"assignee_notification_message": "A new entry requires your input",
"assignee_notification_disable_autoformat": "0",
"resend_assignee_emailEnable": "0",
"resend_assignee_emailValue": "7",
"expiration": "0",
"expiration_type": "delay",
"expiration_date": "",
"expiration_delay_offset": "",
"expiration_delay_unit": "hours",
"status_expiration": "complete",
"destination_expired": "next",
"destination_complete": "next"
},
"addon_slug": "gravityflow",
"order": "0",
"feed_order": "0"
}
]
}
},
"version": "2.0.7.1"
}

View File

@@ -0,0 +1,321 @@
{
"0": {
"title": "0006 Hidden Field Calculations",
"description": "",
"labelPlacement": "top_label",
"descriptionPlacement": "below",
"button": {
"type": "text",
"text": "Submit",
"imageUrl": ""
},
"fields": [
{
"type": "text",
"id": 1,
"label": "Single Line",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": 183,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"visibility": "visible",
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"productField": "",
"enablePasswordInput": "",
"maxLength": "",
"displayOnly": "",
"enablePrice": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false
},
{
"type": "number",
"id": 2,
"label": "Number",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"numberFormat": "decimal_dot",
"formId": 183,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"visibility": "visible",
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"enableCalculation": true,
"rangeMin": "",
"rangeMax": "",
"productField": "",
"displayOnly": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false,
"enablePrice": ""
},
{
"type": "number",
"id": 3,
"label": "Number 2",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"numberFormat": "decimal_dot",
"formId": 183,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"visibility": "administrative",
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"enableCalculation": true,
"rangeMin": "",
"rangeMax": "",
"productField": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "{Number:2}*2",
"calculationRounding": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false,
"displayOnly": "",
"enablePrice": ""
},
{
"type": "number",
"id": 4,
"label": "Number 3",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"numberFormat": "decimal_dot",
"formId": 183,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"visibility": "administrative",
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"enableCalculation": true,
"rangeMin": "",
"rangeMax": "",
"productField": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "{Number 2:3}*2",
"calculationRounding": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false,
"displayOnly": "",
"enablePrice": ""
}
],
"version": "2.3-dev-1",
"id": 183,
"useCurrentUserAsAuthor": true,
"postContentTemplateEnabled": false,
"postTitleTemplateEnabled": false,
"postTitleTemplate": "",
"postContentTemplate": "",
"lastPageButton": null,
"pagination": null,
"firstPageCssClass": null,
"confirmations": [
{
"id": "593287f5f23d9",
"name": "Default Confirmation",
"isDefault": true,
"type": "message",
"message": "Thanks for contacting us! We will get in touch with you shortly.",
"url": "",
"pageId": "",
"queryString": ""
}
],
"notifications": [
{
"id": "593287f5f16b1",
"to": "{admin_email}",
"name": "Admin Notification",
"event": "form_submission",
"toType": "email",
"subject": "New submission from {form_title}",
"message": "{all_fields}",
"isActive": false
}
],
"feeds": {
"gravityflow": [
{
"id": "440",
"form_id": "183",
"is_active": "1",
"meta": {
"step_name": "User Input",
"description": "",
"step_type": "user_input",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": [],
"scheduled": "0",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "",
"schedule_delay_unit": "hours",
"schedule_date_field_offset": "0",
"schedule_date_field_offset_unit": "hours",
"schedule_date_field_before_after": "after",
"type": "select",
"assignees": [
"user_id|1"
],
"editable_fields": [
"3",
"4"
],
"routing": "",
"highlight_editable_fields_enabled": "0",
"highlight_editable_fields_class": "green-triangle",
"assignee_policy": "all",
"instructionsEnable": "0",
"instructionsValue": "",
"display_fields_mode": "selected_fields",
"display_fields_selected": [
"1"
],
"default_status": "hidden",
"note_mode": "not_required",
"assignee_notification_enabled": "1",
"assignee_notification_from_name": "",
"assignee_notification_from_email": "{admin_email}",
"assignee_notification_reply_to": "",
"assignee_notification_bcc": "",
"assignee_notification_subject": "",
"assignee_notification_message": "A new entry requires your input",
"assignee_notification_disable_autoformat": "0",
"resend_assignee_emailEnable": "0",
"resend_assignee_emailValue": "7",
"resend_assignee_email_repeatEnable": "0",
"resend_assignee_email_repeatValue": "3",
"in_progress_notification_enabled": "0",
"in_progress_notification_type": "select",
"in_progress_notification_routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"in_progress_notification_from_name": "",
"in_progress_notification_from_email": "{admin_email}",
"in_progress_notification_reply_to": "",
"in_progress_notification_bcc": "",
"in_progress_notification_subject": "",
"in_progress_notification_message": "Entry {entry_id} has been updated and remains in progress.",
"in_progress_notification_disable_autoformat": "0",
"complete_notification_enabled": "0",
"complete_notification_type": "select",
"complete_notification_routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"complete_notification_from_name": "",
"complete_notification_from_email": "{admin_email}",
"complete_notification_reply_to": "",
"complete_notification_bcc": "",
"complete_notification_subject": "",
"complete_notification_message": "Entry {entry_id} has been updated completing the step.",
"complete_notification_disable_autoformat": "0",
"confirmation_messageEnable": "0",
"confirmation_messageValue": "Thank you.",
"expiration": "0",
"expiration_type": "delay",
"expiration_date": "",
"expiration_delay_offset": "",
"expiration_delay_unit": "hours",
"expiration_date_field_offset": "0",
"expiration_date_field_offset_unit": "hours",
"expiration_date_field_before_after": "after",
"status_expiration": "complete",
"destination_expired": "next",
"destination_complete": "next"
},
"addon_slug": "gravityflow",
"order": "0",
"feed_order": "0"
}
]
}
},
"version": "2.3-dev-1"
}

View File

@@ -0,0 +1,948 @@
{
"0": {
"title": "0007 Job Apply Agency",
"description": "",
"labelPlacement": "top_label",
"descriptionPlacement": "below",
"button": {
"type": "text",
"text": "Submit",
"imageUrl": ""
},
"fields": [
{
"type": "name",
"id": 3,
"label": "Name",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"nameFormat": "advanced",
"inputs": [
{
"id": "3.2",
"label": "Prefix",
"name": "",
"choices": [
{
"text": "Mr.",
"value": "Mr.",
"isSelected": false,
"price": ""
},
{
"text": "Mrs.",
"value": "Mrs.",
"isSelected": false,
"price": ""
},
{
"text": "Miss",
"value": "Miss",
"isSelected": false,
"price": ""
},
{
"text": "Ms.",
"value": "Ms.",
"isSelected": false,
"price": ""
},
{
"text": "Dr.",
"value": "Dr.",
"isSelected": false,
"price": ""
},
{
"text": "Prof.",
"value": "Prof.",
"isSelected": false,
"price": ""
},
{
"text": "Rev.",
"value": "Rev.",
"isSelected": false,
"price": ""
}
],
"isHidden": true,
"inputType": "radio"
},
{
"id": "3.3",
"label": "First",
"name": ""
},
{
"id": "3.4",
"label": "Middle",
"name": "",
"isHidden": true
},
{
"id": "3.6",
"label": "Last",
"name": ""
},
{
"id": "3.8",
"label": "Suffix",
"name": "",
"isHidden": true
}
],
"formId": 2,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"failed_validation": "",
"productField": "",
"displayOnly": ""
},
{
"type": "email",
"id": 5,
"label": "Email",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": 2,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"failed_validation": "",
"productField": "",
"emailConfirmEnabled": "",
"displayOnly": ""
},
{
"type": "phone",
"id": 4,
"label": "Phone",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"phoneFormat": "standard",
"formId": 2,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"form_id": "",
"failed_validation": "",
"productField": "",
"displayOnly": ""
},
{
"type": "select",
"id": 2,
"label": "Gender",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"choices": [
{
"text": "Male",
"value": "Male",
"isSelected": false,
"price": ""
},
{
"text": "Female",
"value": "Female",
"isSelected": false,
"price": ""
},
{
"text": "Prefer Not to Answer",
"value": "Prefer Not to Answer",
"isSelected": false,
"price": ""
}
],
"formId": 2,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"conditionalLogic": "",
"failed_validation": "",
"productField": "",
"enablePrice": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false,
"displayOnly": ""
},
{
"type": "select",
"id": 6,
"label": "Age",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"choices": [
{
"text": "Under 18",
"value": "Under 18",
"isSelected": false,
"price": ""
},
{
"text": "18-24",
"value": "18-24",
"isSelected": false,
"price": ""
},
{
"text": "25-34",
"value": "25-34",
"isSelected": false,
"price": ""
},
{
"text": "35-44",
"value": "35-44",
"isSelected": false,
"price": ""
},
{
"text": "45-54",
"value": "45-54",
"isSelected": false,
"price": ""
},
{
"text": "55-64",
"value": "55-64",
"isSelected": false,
"price": ""
},
{
"text": "65 or Above",
"value": "65 or Above",
"isSelected": false,
"price": ""
},
{
"text": "Prefer Not to Answer",
"value": "Prefer Not to Answer",
"isSelected": false,
"price": ""
}
],
"formId": 2,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"conditionalLogic": "",
"failed_validation": "",
"productField": "",
"enablePrice": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false,
"displayOnly": ""
},
{
"type": "select",
"id": 7,
"label": "Current status",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"choices": [
{
"text": "Employed Full-Time",
"value": "Employed Full-Time",
"isSelected": false,
"price": ""
},
{
"text": "Employed Part-Time",
"value": "Employed Part-Time",
"isSelected": false,
"price": ""
},
{
"text": "Self-employed",
"value": "Self-employed",
"isSelected": false,
"price": ""
},
{
"text": "Not employed but looking for work",
"value": "Not employed but looking for work",
"isSelected": false,
"price": ""
},
{
"text": "Not employed and not looking for work",
"value": "Not employed and not looking for work",
"isSelected": false,
"price": ""
},
{
"text": "Homemaker",
"value": "Homemaker",
"isSelected": false,
"price": ""
},
{
"text": "Retired",
"value": "Retired",
"isSelected": false,
"price": ""
},
{
"text": "Student",
"value": "Student",
"isSelected": false,
"price": ""
},
{
"text": "Prefer Not to Answer",
"value": "Prefer Not to Answer",
"isSelected": false,
"price": ""
}
],
"formId": 2,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"conditionalLogic": "",
"failed_validation": "",
"productField": "",
"enablePrice": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false,
"displayOnly": ""
},
{
"type": "select",
"id": 8,
"label": "Searching for job",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"choices": [
{
"text": "Full-Time",
"value": "Full-Time",
"isSelected": false,
"price": ""
},
{
"text": "Part-Time",
"value": "Part-Time",
"isSelected": false,
"price": ""
},
{
"text": "Per Diem",
"value": "Per Diem",
"isSelected": false,
"price": ""
},
{
"text": "Employee",
"value": "Employee",
"isSelected": false,
"price": ""
},
{
"text": "Temporary",
"value": "Temporary",
"isSelected": false,
"price": ""
},
{
"text": "Contract",
"value": "Contract",
"isSelected": false,
"price": ""
},
{
"text": "Intern",
"value": "Intern",
"isSelected": false,
"price": ""
},
{
"text": "Seasonal",
"value": "Seasonal",
"isSelected": false,
"price": ""
}
],
"formId": 2,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"conditionalLogic": "",
"failed_validation": "",
"productField": "",
"enablePrice": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false,
"displayOnly": ""
}
],
"version": "2.0.6.3",
"id": 2,
"useCurrentUserAsAuthor": true,
"postContentTemplateEnabled": false,
"postTitleTemplateEnabled": false,
"postTitleTemplate": "",
"postContentTemplate": "",
"lastPageButton": null,
"pagination": null,
"firstPageCssClass": null,
"confirmations": [
{
"id": "57bc2c5ebc50d",
"name": "Default Confirmation",
"isDefault": true,
"type": "message",
"message": "Thanks for contacting us! We will get in touch with you shortly.",
"url": "",
"pageId": "",
"queryString": ""
}
],
"notifications": [
{
"id": "57bc2c5ebc193",
"to": "{admin_email}",
"name": "Admin Notification",
"event": "form_submission",
"toType": "email",
"subject": "New submission from {form_title}",
"message": "{all_fields}"
}
],
"feeds": {
"gravityflow": [
{
"id": "5",
"form_id": "2",
"is_active": "1",
"feed_order": "0",
"meta": {
"step_name": "Get approval",
"description": "",
"step_type": "approval",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": {
"conditionalLogic": {
"actionType": "show",
"logicType": "all",
"rules": [
{
"fieldId": "1",
"operator": "is",
"value": ""
}
]
}
},
"scheduled": "0",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "",
"schedule_delay_unit": "hours",
"schedule_date_field_offset": "0",
"schedule_date_field_offset_unit": "hours",
"schedule_date_field_before_after": "after",
"type": "routing",
"routing": [
{
"target": false,
"fieldId": "2",
"operator": "is",
"value": "Male",
"type": false,
"assignee": "user_id|2"
},
{
"target": false,
"fieldId": "2",
"operator": "is",
"value": "Female",
"type": false,
"assignee": "user_id|3"
},
{
"target": false,
"fieldId": "6",
"operator": "<",
"value": "55-64",
"type": false,
"assignee": "user_id|2"
},
{
"target": false,
"fieldId": "6",
"operator": ">",
"value": "65 or Above",
"type": false,
"assignee": "user_id|3"
},
{
"target": false,
"fieldId": "7",
"operator": "<",
"value": "Homemaker",
"type": false,
"assignee": "user_id|2"
},
{
"target": false,
"fieldId": "7",
"operator": ">",
"value": "Retired",
"type": false,
"assignee": "user_id|3"
},
{
"target": false,
"fieldId": "8",
"operator": "<",
"value": "Employee",
"type": false,
"assignee": "user_id|2"
},
{
"target": false,
"fieldId": "8",
"operator": ">",
"value": "Temporary",
"type": false,
"assignee": "user_id|3"
},
{
"target": false,
"fieldId": "0",
"operator": "contains",
"value": "Prefer Not to Answer",
"type": false,
"assignee": "user_id|4"
}
],
"unanimous_approval": "",
"instructionsEnable": "1",
"instructionsValue": "Instructions: please review the values in the fields below and click on the Approve or Reject button",
"display_fields_mode": "all_fields",
"assignee_notification_enabled": "1",
"assignee_notification_from_name": "",
"assignee_notification_from_email": "{admin_email}",
"assignee_notification_reply_to": "",
"assignee_notification_bcc": "",
"assignee_notification_subject": "",
"assignee_notification_message": "A new entry is pending your approval. Please check your Workflow Inbox.",
"assignee_notification_disable_autoformat": "0",
"resend_assignee_emailEnable": "0",
"resend_assignee_emailValue": "7",
"rejection_notification_enabled": "1",
"rejection_notification_type": "select",
"rejection_notification_users": [
"role|subscriber"
],
"rejection_notification_routing": "",
"rejection_notification_from_name": "",
"rejection_notification_from_email": "{admin_email}",
"rejection_notification_reply_to": "",
"rejection_notification_bcc": "",
"rejection_notification_subject": "",
"rejection_notification_message": "Entry {entry_id} has been rejected",
"rejection_notification_disable_autoformat": "0",
"approval_notification_enabled": "1",
"approval_notification_type": "select",
"approval_notification_users": [
"role|subscriber"
],
"approval_notification_routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"approval_notification_from_name": "",
"approval_notification_from_email": "{admin_email}",
"approval_notification_reply_to": "",
"approval_notification_bcc": "",
"approval_notification_subject": "",
"approval_notification_message": "Entry {entry_id} has been approved",
"approval_notification_disable_autoformat": "0",
"revertEnable": "0",
"revertValue": "7",
"note_mode": "required_if_reverted_or_rejected",
"expiration": "0",
"expiration_type": "delay",
"expiration_date": "",
"expiration_delay_offset": "",
"expiration_delay_unit": "hours",
"status_expiration": "rejected",
"destination_expired": "next",
"destination_rejected": "complete",
"destination_approved": "7"
},
"addon_slug": "gravityflow"
},
{
"id": "7",
"form_id": "2",
"is_active": "1",
"feed_order": "0",
"meta": {
"step_name": "Data validation",
"description": "",
"step_type": "user_input",
"feed_condition_conditional_logic": "1",
"feed_condition_conditional_logic_object": {
"conditionalLogic": {
"actionType": "show",
"logicType": "any",
"rules": [
{
"fieldId": "4",
"operator": "is",
"value": ""
},
{
"fieldId": "5",
"operator": "is",
"value": ""
}
]
}
},
"scheduled": "0",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "",
"schedule_delay_unit": "hours",
"schedule_date_field_offset": "0",
"schedule_date_field_offset_unit": "hours",
"schedule_date_field_before_after": "after",
"type": "routing",
"editable_fields": [
"4"
],
"routing": [
{
"target": false,
"fieldId": "5",
"operator": "is",
"value": "",
"type": false,
"assignee": "user_id|2",
"editable_fields": [
"5"
]
},
{
"target": false,
"fieldId": "4",
"operator": "is",
"value": "",
"type": false,
"assignee": "user_id|3",
"editable_fields": [
"4"
]
}
],
"highlight_editable_fields_enabled": "0",
"highlight_editable_fields_class": "green-triangle",
"assignee_policy": "all",
"instructionsEnable": "0",
"instructionsValue": "",
"display_fields_mode": "all_fields",
"default_status": "hidden",
"note_mode": "not_required",
"assignee_notification_enabled": "1",
"assignee_notification_from_name": "",
"assignee_notification_from_email": "{admin_email}",
"assignee_notification_reply_to": "",
"assignee_notification_bcc": "",
"assignee_notification_subject": "",
"assignee_notification_message": "A new entry requires your input",
"assignee_notification_disable_autoformat": "0",
"resend_assignee_emailEnable": "0",
"resend_assignee_emailValue": "7",
"expiration": "0",
"expiration_type": "delay",
"expiration_date": "",
"expiration_delay_offset": "",
"expiration_delay_unit": "hours",
"status_expiration": "complete",
"destination_expired": "next",
"destination_complete": "9"
},
"addon_slug": "gravityflow"
},
{
"id": "9",
"form_id": "2",
"is_active": "1",
"feed_order": "0",
"meta": {
"step_name": "Admin approval",
"description": "",
"step_type": "approval",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": [],
"scheduled": "0",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "",
"schedule_delay_unit": "hours",
"schedule_date_field_offset": "0",
"schedule_date_field_offset_unit": "hours",
"schedule_date_field_before_after": "after",
"type": "select",
"assignees": [
"user_id|1"
],
"routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"unanimous_approval": "",
"instructionsEnable": "0",
"instructionsValue": "Instructions: please review the values in the fields below and click on the Approve or Reject button",
"display_fields_mode": "all_fields",
"assignee_notification_enabled": "1",
"assignee_notification_from_name": "",
"assignee_notification_from_email": "{admin_email}",
"assignee_notification_reply_to": "",
"assignee_notification_bcc": "",
"assignee_notification_subject": "",
"assignee_notification_message": "A new entry is pending your approval. Please check your Workflow Inbox.",
"assignee_notification_disable_autoformat": "0",
"resend_assignee_emailEnable": "0",
"resend_assignee_emailValue": "7",
"rejection_notification_enabled": "1",
"rejection_notification_type": "select",
"rejection_notification_users": [
"user_id|3"
],
"rejection_notification_routing": "",
"rejection_notification_from_name": "",
"rejection_notification_from_email": "{admin_email}",
"rejection_notification_reply_to": "",
"rejection_notification_bcc": "",
"rejection_notification_subject": "",
"rejection_notification_message": "Entry {entry_id} has been rejected",
"rejection_notification_disable_autoformat": "0",
"approval_notification_enabled": "0",
"approval_notification_type": "select",
"approval_notification_routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"approval_notification_from_name": "",
"approval_notification_from_email": "{admin_email}",
"approval_notification_reply_to": "",
"approval_notification_bcc": "",
"approval_notification_subject": "",
"approval_notification_message": "Entry {entry_id} has been approved",
"approval_notification_disable_autoformat": "0",
"revertEnable": "1",
"revertValue": "7",
"note_mode": "not_required",
"expiration": "0",
"expiration_type": "delay",
"expiration_date": "",
"expiration_delay_offset": "",
"expiration_delay_unit": "hours",
"status_expiration": "rejected",
"destination_expired": "next",
"destination_rejected": "complete",
"destination_approved": "8"
},
"addon_slug": "gravityflow"
},
{
"id": "8",
"form_id": "2",
"is_active": "1",
"feed_order": "0",
"meta": {
"step_name": "Send email",
"description": "",
"step_type": "notification",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": [],
"scheduled": "0",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "",
"schedule_delay_unit": "hours",
"schedule_date_field_offset": "0",
"schedule_date_field_offset_unit": "hours",
"schedule_date_field_before_after": "after",
"notification_id_57bc2c5ebc193": "0",
"workflow_notification_enabled": "1",
"workflow_notification_type": "select",
"workflow_notification_users": [
"user_id|1"
],
"workflow_notification_routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"workflow_notification_from_name": "Admin",
"workflow_notification_from_email": "{admin_email}",
"workflow_notification_reply_to": "",
"workflow_notification_bcc": "",
"workflow_notification_subject": "",
"workflow_notification_message": "",
"workflow_notification_disable_autoformat": "0",
"destination_complete": "complete"
},
"addon_slug": "gravityflow"
}
]
}
},
"version": "2.0.6.3"
}

View File

@@ -0,0 +1,547 @@
{
"0": {
"title": "0008 Request Salary Raise",
"description": "",
"labelPlacement": "top_label",
"descriptionPlacement": "below",
"button": {
"type": "text",
"text": "Submit",
"imageUrl": ""
},
"fields": [
{
"type": "workflow_user",
"id": 3,
"label": "User",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": 3,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": [
{
"value": "1",
"text": "admin"
}
],
"conditionalLogic": "",
"failed_validation": "",
"productField": "",
"enablePrice": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false,
"displayOnly": ""
},
{
"type": "number",
"id": 1,
"label": "Number",
"adminLabel": "",
"isRequired": true,
"size": "medium",
"errorMessage": "",
"inputs": null,
"numberFormat": "decimal_dot",
"formId": 3,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"enableCalculation": false,
"rangeMin": "",
"failed_validation": "",
"productField": "",
"rangeMax": "",
"displayOnly": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false
},
{
"type": "select",
"id": 2,
"label": "Department",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"choices": [
{
"text": "First Choice",
"value": "First Choice",
"isSelected": false,
"price": ""
},
{
"text": "Second Choice",
"value": "Second Choice",
"isSelected": false,
"price": ""
},
{
"text": "Third Choice",
"value": "Third Choice",
"isSelected": false,
"price": ""
}
],
"formId": 3,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"conditionalLogic": "",
"failed_validation": "",
"productField": "",
"enablePrice": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false,
"displayOnly": ""
}
],
"version": "2.0.6.3",
"id": 3,
"useCurrentUserAsAuthor": true,
"postContentTemplateEnabled": false,
"postTitleTemplateEnabled": false,
"postTitleTemplate": "",
"postContentTemplate": "",
"lastPageButton": null,
"pagination": null,
"firstPageCssClass": null,
"confirmations": [
{
"id": "57b7100a3c439",
"name": "Default Confirmation",
"isDefault": true,
"type": "message",
"message": "Thanks for contacting us! We will get in touch with you shortly.",
"url": "",
"pageId": "",
"queryString": ""
}
],
"notifications": [
{
"id": "57b7100a3bfdf",
"to": "{admin_email}",
"name": "Admin Notification",
"event": "form_submission",
"toType": "email",
"subject": "New submission from {form_title}",
"message": "{all_fields}"
}
],
"feeds": {
"gravityflow": [
{
"id": "5",
"form_id": "3",
"is_active": "1",
"feed_order": "0",
"meta": {
"step_name": "Department manager",
"description": "",
"step_type": "approval",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": {
"conditionalLogic": {
"actionType": "show",
"logicType": "all",
"rules": [
{
"fieldId": "3",
"operator": "is",
"value": "1"
}
]
}
},
"scheduled": "0",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "",
"schedule_delay_unit": "hours",
"schedule_date_field_offset": "0",
"schedule_date_field_offset_unit": "hours",
"schedule_date_field_before_after": "after",
"type": "select",
"assignees": [
"role|administrator"
],
"routing": [
{
"target": false,
"fieldId": "2",
"operator": "is",
"value": "First Choice",
"type": false,
"assignee": "role|contributor"
},
{
"target": false,
"fieldId": "2",
"operator": "is",
"value": "Second Choice",
"type": false,
"assignee": "role|author"
},
{
"target": false,
"fieldId": "2",
"operator": "is",
"value": "Third Choice",
"type": false,
"assignee": "role|editor"
}
],
"unanimous_approval": "",
"instructionsEnable": "0",
"instructionsValue": "Instructions: please review the values in the fields below and click on the Approve or Reject button",
"display_fields_mode": "all_fields",
"assignee_notification_enabled": "1",
"assignee_notification_from_name": "",
"assignee_notification_from_email": "{admin_email}",
"assignee_notification_reply_to": "",
"assignee_notification_bcc": "",
"assignee_notification_subject": "",
"assignee_notification_message": "A new entry is pending your approval. Please check your Workflow Inbox.",
"assignee_notification_disable_autoformat": "0",
"resend_assignee_emailEnable": "0",
"resend_assignee_emailValue": "7",
"rejection_notification_enabled": "1",
"rejection_notification_type": "select",
"rejection_notification_users": [
"user_id|1"
],
"rejection_notification_routing": "",
"rejection_notification_from_name": "",
"rejection_notification_from_email": "{admin_email}",
"rejection_notification_reply_to": "",
"rejection_notification_bcc": "",
"rejection_notification_subject": "",
"rejection_notification_message": "Entry {entry_id} has been rejected",
"rejection_notification_disable_autoformat": "0",
"approval_notification_enabled": "0",
"approval_notification_type": "select",
"approval_notification_users": [
"user_id|1"
],
"approval_notification_routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"approval_notification_from_name": "",
"approval_notification_from_email": "{admin_email}",
"approval_notification_reply_to": "",
"approval_notification_bcc": "",
"approval_notification_subject": "",
"approval_notification_message": "Entry {entry_id} has been approved",
"approval_notification_disable_autoformat": "0",
"revertEnable": "0",
"revertValue": "6",
"note_mode": "not_required",
"expiration": "0",
"expiration_type": "delay",
"expiration_date": "",
"expiration_delay_offset": "",
"expiration_delay_unit": "hours",
"status_expiration": "rejected",
"destination_expired": "next",
"destination_rejected": "complete",
"destination_approved": 6
},
"addon_slug": "gravityflow"
},
{
"id": "6",
"form_id": "3",
"is_active": "1",
"feed_order": "0",
"meta": {
"step_name": "Send to CEO for approval",
"description": "",
"step_type": "user_input",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": [],
"scheduled": "0",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "",
"schedule_delay_unit": "hours",
"schedule_date_field_offset": "0",
"schedule_date_field_offset_unit": "hours",
"schedule_date_field_before_after": "after",
"type": "select",
"assignees": [
"role|administrator"
],
"routing": "",
"highlight_editable_fields_enabled": "0",
"highlight_editable_fields_class": "green-triangle",
"assignee_policy": "all",
"instructionsEnable": "0",
"instructionsValue": "",
"display_fields_mode": "all_fields",
"default_status": "hidden",
"note_mode": "not_required",
"assignee_notification_enabled": "1",
"assignee_notification_from_name": "",
"assignee_notification_from_email": "{admin_email}",
"assignee_notification_reply_to": "",
"assignee_notification_bcc": "",
"assignee_notification_subject": "",
"assignee_notification_message": "A new entry requires your input",
"assignee_notification_disable_autoformat": "0",
"resend_assignee_emailEnable": "0",
"resend_assignee_emailValue": "7",
"expiration": "0",
"expiration_type": "delay",
"expiration_date": "",
"expiration_delay_offset": "",
"expiration_delay_unit": "hours",
"status_expiration": "complete",
"destination_expired": "next",
"destination_complete": "7"
},
"addon_slug": "gravityflow"
},
{
"id": "7",
"form_id": "3",
"is_active": "1",
"feed_order": "0",
"meta": {
"step_name": "CEO approval",
"description": "",
"step_type": "approval",
"feed_condition_conditional_logic": "1",
"feed_condition_conditional_logic_object": {
"conditionalLogic": {
"actionType": "show",
"logicType": "all",
"rules": [
{
"fieldId": "2",
"operator": "is",
"value": "First Choice"
},
{
"fieldId": "2",
"operator": "is",
"value": "Second Choice"
},
{
"fieldId": "2",
"operator": "is",
"value": "Third Choice"
}
]
}
},
"scheduled": "0",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "",
"schedule_delay_unit": "hours",
"schedule_date_field_offset": "0",
"schedule_date_field_offset_unit": "hours",
"schedule_date_field_before_after": "after",
"type": "select",
"assignees": [
"role|administrator"
],
"routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"unanimous_approval": "",
"instructionsEnable": "0",
"instructionsValue": "Instructions: please review the values in the fields below and click on the Approve or Reject button",
"display_fields_mode": "all_fields",
"assignee_notification_enabled": "1",
"assignee_notification_from_name": "",
"assignee_notification_from_email": "{admin_email}",
"assignee_notification_reply_to": "",
"assignee_notification_bcc": "",
"assignee_notification_subject": "",
"assignee_notification_message": "A new entry is pending your approval. Please check your Workflow Inbox.",
"assignee_notification_disable_autoformat": "0",
"resend_assignee_emailEnable": "0",
"resend_assignee_emailValue": "7",
"rejection_notification_enabled": "1",
"rejection_notification_type": "select",
"rejection_notification_users": [
"user_id|1"
],
"rejection_notification_routing": "",
"rejection_notification_from_name": "",
"rejection_notification_from_email": "{admin_email}",
"rejection_notification_reply_to": "",
"rejection_notification_bcc": "",
"rejection_notification_subject": "",
"rejection_notification_message": "Entry {entry_id} has been rejected",
"rejection_notification_disable_autoformat": "0",
"approval_notification_enabled": "1",
"approval_notification_type": "select",
"approval_notification_users": [
"user_id|1"
],
"approval_notification_routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"approval_notification_from_name": "",
"approval_notification_from_email": "{admin_email}",
"approval_notification_reply_to": "",
"approval_notification_bcc": "",
"approval_notification_subject": "",
"approval_notification_message": "Entry {entry_id} has been approved",
"approval_notification_disable_autoformat": "0",
"note_mode": "not_required",
"expiration": "0",
"expiration_type": "delay",
"expiration_date": "",
"expiration_delay_offset": "",
"expiration_delay_unit": "hours",
"status_expiration": "rejected",
"destination_expired": "next",
"destination_rejected": "complete",
"destination_approved": 8
},
"addon_slug": "gravityflow"
},
{
"id": "8",
"form_id": "3",
"is_active": "1",
"feed_order": "0",
"meta": {
"step_name": "Department manager notification",
"description": "",
"step_type": "notification",
"feed_condition_conditional_logic": "1",
"feed_condition_conditional_logic_object": {
"conditionalLogic": {
"actionType": "show",
"logicType": "all",
"rules": [
{
"fieldId": "3",
"operator": "is",
"value": "1"
}
]
}
},
"scheduled": "0",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "",
"schedule_delay_unit": "hours",
"schedule_date_field_offset": "0",
"schedule_date_field_offset_unit": "hours",
"schedule_date_field_before_after": "after",
"notification_id_57b7100a3bfdf": "0",
"workflow_notification_enabled": "1",
"workflow_notification_type": "select",
"workflow_notification_users": [
"role|contributor",
"role|author",
"role|editor"
],
"workflow_notification_routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"workflow_notification_from_name": "",
"workflow_notification_from_email": "{admin_email}",
"workflow_notification_reply_to": "",
"workflow_notification_bcc": "",
"workflow_notification_subject": "",
"workflow_notification_message": "",
"workflow_notification_disable_autoformat": "0",
"destination_complete": "complete"
},
"addon_slug": "gravityflow"
}
]
}
},
"version": "2.0.6.3"
}

View File

@@ -0,0 +1,178 @@
{
"0": {
"title": "0009 Schedule Step",
"description": "",
"labelPlacement": "top_label",
"descriptionPlacement": "below",
"button": {
"type": "text",
"text": "Submit",
"imageUrl": ""
},
"fields": [
{
"type": "text",
"id": 1,
"label": "Input text",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": 9,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"failed_validation": "",
"productField": "",
"enablePasswordInput": "",
"maxLength": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false
},
{
"type": "textarea",
"id": 2,
"label": "Text paragraph",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": 9,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"failed_validation": "",
"productField": "",
"form_id": "",
"useRichTextEditor": false,
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false
}
],
"version": "2.0.6.3",
"id": 9,
"useCurrentUserAsAuthor": true,
"postContentTemplateEnabled": false,
"postTitleTemplateEnabled": false,
"postTitleTemplate": "",
"postContentTemplate": "",
"lastPageButton": null,
"pagination": null,
"firstPageCssClass": null,
"confirmations": [
{
"id": "57badfe4e2cfe",
"name": "Default Confirmation",
"isDefault": true,
"type": "message",
"message": "Thanks for contacting us! We will get in touch with you shortly.",
"url": "",
"pageId": "",
"queryString": ""
}
],
"notifications": [
{
"id": "57badfe4e29c2",
"to": "{admin_email}",
"name": "Admin Notification",
"event": "form_submission",
"toType": "email",
"subject": "New submission from {form_title}",
"message": "{all_fields}"
}
],
"feeds": {
"gravityflow": [
{
"id": "19",
"form_id": "9",
"is_active": "1",
"feed_order": "0",
"meta": {
"step_name": "Send schedule notification",
"description": "",
"step_type": "notification",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": [],
"scheduled": "1",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "2",
"schedule_delay_unit": "minutes",
"schedule_date_field_offset": "0",
"schedule_date_field_offset_unit": "hours",
"schedule_date_field_before_after": "after",
"notification_id_57badfe4e29c2": "0",
"workflow_notification_enabled": "1",
"workflow_notification_type": "select",
"workflow_notification_users": [
"role|contributor",
"role|author",
"role|editor",
"role|administrator"
],
"workflow_notification_routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"workflow_notification_from_name": "{Input text:1}",
"workflow_notification_from_email": "{admin_email}",
"workflow_notification_reply_to": "",
"workflow_notification_bcc": "",
"workflow_notification_subject": "",
"workflow_notification_message": "",
"workflow_notification_disable_autoformat": "0",
"destination_complete": "complete"
},
"addon_slug": "gravityflow"
}
]
}
},
"version": "2.0.6.3"
}

View File

@@ -0,0 +1,527 @@
{
"0": {
"title": "0010 Specific Assign",
"description": "",
"labelPlacement": "top_label",
"descriptionPlacement": "below",
"button": {
"type": "text",
"text": "Submit",
"imageUrl": ""
},
"fields": [
{
"type": "post_title",
"id": 1,
"label": "Post Title",
"adminLabel": "",
"isRequired": true,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": 1,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"failed_validation": "",
"productField": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false
},
{
"type": "post_content",
"id": 2,
"label": "Post Body",
"adminLabel": "",
"isRequired": true,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": 1,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"failed_validation": "",
"productField": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false
},
{
"type": "post_tags",
"id": 3,
"label": "Post Tags",
"adminLabel": "",
"isRequired": false,
"size": "large",
"errorMessage": "",
"inputs": null,
"formId": 1,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"failed_validation": "",
"productField": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false
},
{
"type": "post_custom_field",
"id": 4,
"label": "Post Custom Category",
"adminLabel": "",
"isRequired": true,
"size": "medium",
"errorMessage": "",
"inputs": [
{
"id": "4.1",
"label": "First Choice",
"name": ""
},
{
"id": "4.2",
"label": "Second Choice",
"name": ""
},
{
"id": "4.3",
"label": "Third Choice",
"name": ""
}
],
"inputType": "checkbox",
"formId": 1,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": [
{
"text": "First Choice",
"value": "First Choice",
"isSelected": false,
"price": ""
},
{
"text": "Second Choice",
"value": "Second Choice",
"isSelected": false,
"price": ""
},
{
"text": "Third Choice",
"value": "Third Choice",
"isSelected": false,
"price": ""
}
],
"conditionalLogic": "",
"failed_validation": "",
"productField": "",
"enablePasswordInput": "",
"maxLength": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false
}
],
"version": "2.0.6.3",
"id": 1,
"useCurrentUserAsAuthor": true,
"postContentTemplateEnabled": false,
"postTitleTemplateEnabled": false,
"postTitleTemplate": "",
"postContentTemplate": "",
"lastPageButton": null,
"pagination": null,
"firstPageCssClass": null,
"postAuthor": "1",
"postCategory": "1",
"postFormat": "0",
"postStatus": "draft",
"is_active": "1",
"date_created": "2016-08-22 13:24:55",
"is_trash": "0",
"confirmations": [
{
"id": "57bafd27eb7de",
"name": "Default Confirmation",
"isDefault": true,
"type": "message",
"message": "Thanks for contacting us! We will get in touch with you shortly.",
"url": "",
"pageId": "",
"queryString": ""
}
],
"notifications": [
{
"id": "57bafd27eb42e",
"to": "{admin_email}",
"name": "Admin Notification",
"event": "form_submission",
"toType": "email",
"subject": "New submission from {form_title}",
"message": "{all_fields}"
}
],
"feeds": {
"gravityflow": [
{
"id": "1",
"form_id": "1",
"is_active": "1",
"feed_order": "0",
"meta": {
"step_name": "First approval",
"description": "",
"step_type": "approval",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": {
"conditionalLogic": {
"actionType": "show",
"logicType": "all",
"rules": [
{
"fieldId": "1",
"operator": "is",
"value": ""
}
]
}
},
"scheduled": "0",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "",
"schedule_delay_unit": "hours",
"schedule_date_field_offset": "0",
"schedule_date_field_offset_unit": "hours",
"schedule_date_field_before_after": "after",
"type": "select",
"assignees": [
"user_id|1"
],
"routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"unanimous_approval": "",
"instructionsEnable": "0",
"instructionsValue": "Instructions: please review the values in the fields below and click on the Approve or Reject button",
"display_fields_mode": "all_fields",
"assignee_notification_enabled": "1",
"assignee_notification_from_name": "",
"assignee_notification_from_email": "{admin_email}",
"assignee_notification_reply_to": "",
"assignee_notification_bcc": "",
"assignee_notification_subject": "",
"assignee_notification_message": "A new entry is pending your approval. Please check your Workflow Inbox.",
"assignee_notification_disable_autoformat": "0",
"resend_assignee_emailEnable": "0",
"resend_assignee_emailValue": "7",
"rejection_notification_enabled": "1",
"rejection_notification_type": "select",
"rejection_notification_routing": "",
"rejection_notification_from_name": "",
"rejection_notification_from_email": "{admin_email}",
"rejection_notification_reply_to": "",
"rejection_notification_bcc": "",
"rejection_notification_subject": "",
"rejection_notification_message": "Entry {entry_id} has been rejected",
"rejection_notification_disable_autoformat": "0",
"approval_notification_enabled": "1",
"approval_notification_type": "select",
"approval_notification_routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"approval_notification_from_name": "",
"approval_notification_from_email": "{admin_email}",
"approval_notification_reply_to": "",
"approval_notification_bcc": "",
"approval_notification_subject": "",
"approval_notification_message": "Entry {entry_id} has been approved",
"approval_notification_disable_autoformat": "0",
"note_mode": "not_required",
"post_action_on_rejection": "trash",
"publish_post_on_approval": "0",
"expiration": "0",
"expiration_type": "delay",
"expiration_date": "",
"expiration_delay_offset": "",
"expiration_delay_unit": "hours",
"status_expiration": "rejected",
"destination_expired": "next",
"destination_rejected": "complete",
"destination_approved": "2"
},
"addon_slug": "gravityflow"
},
{
"id": "2",
"form_id": "1",
"is_active": "1",
"feed_order": "0",
"meta": {
"step_name": "Admin Category",
"description": "",
"step_type": "approval",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": {
"conditionalLogic": {
"actionType": "show",
"logicType": "all",
"rules": [
{
"fieldId": "1",
"operator": "is",
"value": ""
}
]
}
},
"scheduled": "0",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "",
"schedule_delay_unit": "hours",
"schedule_date_field_offset": "0",
"schedule_date_field_offset_unit": "hours",
"schedule_date_field_before_after": "after",
"type": "routing",
"assignees": [
"role|administrator"
],
"routing": [
{
"target": false,
"fieldId": "4",
"operator": "is",
"value": "First Choice",
"type": false,
"assignee": "user_id|2"
},
{
"target": false,
"fieldId": "4",
"operator": "is",
"value": "Second Choice",
"type": false,
"assignee": "user_id|3"
},
{
"target": false,
"fieldId": "4",
"operator": "is",
"value": "Third Choice",
"type": false,
"assignee": "user_id|4"
}
],
"unanimous_approval": "",
"instructionsEnable": "0",
"instructionsValue": "Instructions: please review the values in the fields below and click on the Approve or Reject button",
"display_fields_mode": "all_fields",
"assignee_notification_enabled": "1",
"assignee_notification_from_name": "",
"assignee_notification_from_email": "{admin_email}",
"assignee_notification_reply_to": "",
"assignee_notification_bcc": "",
"assignee_notification_subject": "",
"assignee_notification_message": "A new entry is pending your approval. Please check your Workflow Inbox.",
"assignee_notification_disable_autoformat": "0",
"resend_assignee_emailEnable": "0",
"resend_assignee_emailValue": "7",
"rejection_notification_enabled": "1",
"rejection_notification_type": "select",
"rejection_notification_users": [
"user_id|1"
],
"rejection_notification_routing": "",
"rejection_notification_from_name": "",
"rejection_notification_from_email": "{admin_email}",
"rejection_notification_reply_to": "",
"rejection_notification_bcc": "",
"rejection_notification_subject": "",
"rejection_notification_message": "Entry {entry_id} has been rejected",
"rejection_notification_disable_autoformat": "0",
"approval_notification_enabled": "1",
"approval_notification_type": "select",
"approval_notification_users": [
"user_id|1"
],
"approval_notification_routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"approval_notification_from_name": "",
"approval_notification_from_email": "{admin_email}",
"approval_notification_reply_to": "",
"approval_notification_bcc": "",
"approval_notification_subject": "",
"approval_notification_message": "Entry {entry_id} has been approved",
"approval_notification_disable_autoformat": "0",
"note_mode": "not_required",
"post_action_on_rejection": "trash",
"publish_post_on_approval": "0",
"expiration": "0",
"expiration_type": "delay",
"expiration_date": "",
"expiration_delay_offset": "",
"expiration_delay_unit": "hours",
"status_expiration": "rejected",
"destination_expired": "next",
"destination_rejected": "complete",
"destination_approved": "3"
},
"addon_slug": "gravityflow"
},
{
"id": "3",
"form_id": "1",
"is_active": "1",
"feed_order": "0",
"meta": {
"step_name": "Approve notification",
"description": "",
"step_type": "notification",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": {
"conditionalLogic": {
"actionType": "show",
"logicType": "all",
"rules": [
{
"fieldId": "1",
"operator": "is",
"value": ""
}
]
}
},
"scheduled": "0",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "",
"schedule_delay_unit": "hours",
"schedule_date_field_offset": "0",
"schedule_date_field_offset_unit": "hours",
"schedule_date_field_before_after": "after",
"notification_id_57bafd27eb42e": "1",
"workflow_notification_enabled": "1",
"workflow_notification_type": "select",
"workflow_notification_users": [
"user_id|1"
],
"workflow_notification_routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"workflow_notification_from_name": "{user:display_name}",
"workflow_notification_from_email": "{admin_email}",
"workflow_notification_reply_to": "",
"workflow_notification_bcc": "",
"workflow_notification_subject": "",
"workflow_notification_message": "{all_fields}",
"workflow_notification_disable_autoformat": "0",
"destination_complete": "complete"
},
"addon_slug": "gravityflow"
}
]
}
},
"version": "2.0.6.3"
}

View File

@@ -0,0 +1,669 @@
{
"0": {
"title": "0011 Step Conditional Logic",
"description": "",
"labelPlacement": "top_label",
"descriptionPlacement": "below",
"button": {
"type": "text",
"text": "Submit",
"imageUrl": ""
},
"fields": [
{
"type": "text",
"id": 1,
"label": "Single Line",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": "184",
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"visibility": "visible",
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"productField": "",
"enablePasswordInput": "",
"maxLength": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false
},
{
"type": "textarea",
"id": 2,
"label": "Paragraph",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": "184",
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"visibility": "visible",
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"productField": "",
"form_id": "",
"useRichTextEditor": false,
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false
},
{
"type": "workflow_user",
"id": 3,
"label": "User",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"choices": [
{
"value": 1,
"text": "admin"
},
{
"value": 7,
"text": "John Doe"
},
{
"value": 14,
"text": "My Customer"
},
{
"value": 5,
"text": "Publisher Four"
},
{
"value": 2,
"text": "Publisher One"
},
{
"value": 4,
"text": "Publisher Three"
},
{
"value": 3,
"text": "Publisher Two"
},
{
"value": 12,
"text": "Steve"
},
{
"value": 10,
"text": "Steve Henty"
},
{
"value": 11,
"text": "Steve Henty"
},
{
"value": 6,
"text": "Steve Test"
},
{
"value": 9,
"text": "Steve Test"
},
{
"value": 8,
"text": "Steve Test2"
},
{
"value": 13,
"text": "testing44"
}
],
"formId": "184",
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"visibility": "",
"noDuplicates": false,
"defaultValue": "",
"conditionalLogic": "",
"productField": "",
"gravityflowUsersRoleFilter": ""
}
],
"version": "2.3-dev-1",
"id": "184",
"useCurrentUserAsAuthor": true,
"postContentTemplateEnabled": false,
"postTitleTemplateEnabled": false,
"postTitleTemplate": "",
"postContentTemplate": "",
"lastPageButton": null,
"pagination": null,
"firstPageCssClass": null,
"is_active": "1",
"date_created": "2017-06-03 11:35:28",
"is_trash": "0",
"confirmations": [
{
"id": "59329f0092288",
"name": "Default Confirmation",
"isDefault": true,
"type": "message",
"message": "Thanks for contacting us! We will get in touch with you shortly.",
"url": "",
"pageId": "",
"queryString": ""
}
],
"notifications": [
{
"id": "59329f009139f",
"to": "{admin_email}",
"name": "Admin Notification",
"event": "form_submission",
"toType": "email",
"subject": "New submission from {form_title}",
"message": "{all_fields}"
}
],
"feeds": {
"gravityflow": [
{
"id": "441",
"form_id": "184",
"is_active": "1",
"meta": {
"step_name": "Approval if Created By ID2",
"description": "",
"step_type": "approval",
"feed_condition_conditional_logic": "1",
"feed_condition_conditional_logic_object": {
"conditionalLogic": {
"actionType": "show",
"logicType": "all",
"rules": [
{
"fieldId": "created_by",
"operator": "is",
"value": "3"
}
]
}
},
"scheduled": "0",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "",
"schedule_delay_unit": "hours",
"schedule_date_field_offset": "0",
"schedule_date_field_offset_unit": "hours",
"schedule_date_field_before_after": "after",
"type": "select",
"assignees": [
"user_id|1"
],
"routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"unanimous_approval": "",
"instructionsEnable": "0",
"instructionsValue": "Instructions: please review the values in the fields below and click on the Approve or Reject button",
"display_fields_mode": "all_fields",
"assignee_notification_enabled": "0",
"assignee_notification_from_name": "",
"assignee_notification_from_email": "{admin_email}",
"assignee_notification_reply_to": "",
"assignee_notification_bcc": "",
"assignee_notification_subject": "",
"assignee_notification_message": "A new entry is pending your approval. Please check your Workflow Inbox.",
"assignee_notification_disable_autoformat": "0",
"resend_assignee_emailEnable": "0",
"resend_assignee_emailValue": "7",
"resend_assignee_email_repeatEnable": "0",
"resend_assignee_email_repeatValue": "3",
"rejection_notification_enabled": "0",
"rejection_notification_type": "select",
"rejection_notification_routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"rejection_notification_from_name": "",
"rejection_notification_from_email": "{admin_email}",
"rejection_notification_reply_to": "",
"rejection_notification_bcc": "",
"rejection_notification_subject": "",
"rejection_notification_message": "Entry {entry_id} has been rejected",
"rejection_notification_disable_autoformat": "0",
"approval_notification_enabled": "0",
"approval_notification_type": "select",
"approval_notification_routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"approval_notification_from_name": "",
"approval_notification_from_email": "{admin_email}",
"approval_notification_reply_to": "",
"approval_notification_bcc": "",
"approval_notification_subject": "",
"approval_notification_message": "Entry {entry_id} has been approved",
"approval_notification_disable_autoformat": "0",
"note_mode": "not_required",
"expiration": "0",
"expiration_type": "delay",
"expiration_date": "",
"expiration_delay_offset": "",
"expiration_delay_unit": "hours",
"expiration_date_field_offset": "0",
"expiration_date_field_offset_unit": "hours",
"expiration_date_field_before_after": "after",
"status_expiration": "rejected",
"destination_expired": "next",
"destination_rejected": "complete",
"destination_approved": "next"
},
"addon_slug": "gravityflow",
"order": "0",
"feed_order": "0"
},
{
"id": "442",
"form_id": "184",
"is_active": "1",
"meta": {
"step_name": "Approval if Created By ID1",
"description": "",
"step_type": "approval",
"feed_condition_conditional_logic": "1",
"feed_condition_conditional_logic_object": {
"conditionalLogic": {
"actionType": "show",
"logicType": "all",
"rules": [
{
"fieldId": "created_by",
"operator": "is",
"value": "1"
}
]
}
},
"scheduled": "0",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "",
"schedule_delay_unit": "hours",
"schedule_date_field_offset": "0",
"schedule_date_field_offset_unit": "hours",
"schedule_date_field_before_after": "after",
"type": "select",
"assignees": [
"user_id|1"
],
"routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"unanimous_approval": "",
"instructionsEnable": "0",
"instructionsValue": "Instructions: please review the values in the fields below and click on the Approve or Reject button",
"display_fields_mode": "all_fields",
"assignee_notification_enabled": "0",
"assignee_notification_from_name": "",
"assignee_notification_from_email": "{admin_email}",
"assignee_notification_reply_to": "",
"assignee_notification_bcc": "",
"assignee_notification_subject": "",
"assignee_notification_message": "A new entry is pending your approval. Please check your Workflow Inbox.",
"assignee_notification_disable_autoformat": "0",
"resend_assignee_emailEnable": "0",
"resend_assignee_emailValue": "7",
"resend_assignee_email_repeatEnable": "0",
"resend_assignee_email_repeatValue": "3",
"rejection_notification_enabled": "0",
"rejection_notification_type": "select",
"rejection_notification_routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"rejection_notification_from_name": "",
"rejection_notification_from_email": "{admin_email}",
"rejection_notification_reply_to": "",
"rejection_notification_bcc": "",
"rejection_notification_subject": "",
"rejection_notification_message": "Entry {entry_id} has been rejected",
"rejection_notification_disable_autoformat": "0",
"approval_notification_enabled": "0",
"approval_notification_type": "select",
"approval_notification_routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"approval_notification_from_name": "",
"approval_notification_from_email": "{admin_email}",
"approval_notification_reply_to": "",
"approval_notification_bcc": "",
"approval_notification_subject": "",
"approval_notification_message": "Entry {entry_id} has been approved",
"approval_notification_disable_autoformat": "0",
"note_mode": "not_required",
"expiration": "0",
"expiration_type": "delay",
"expiration_date": "",
"expiration_delay_offset": "",
"expiration_delay_unit": "hours",
"expiration_date_field_offset": "0",
"expiration_date_field_offset_unit": "hours",
"expiration_date_field_before_after": "after",
"status_expiration": "rejected",
"destination_expired": "next",
"destination_rejected": "complete",
"destination_approved": "next"
},
"addon_slug": "gravityflow",
"order": "0",
"feed_order": "0"
},
{
"id": "443",
"form_id": "184",
"is_active": "1",
"meta": {
"step_name": "Approval if User Field ID2",
"description": "",
"step_type": "approval",
"feed_condition_conditional_logic": "1",
"feed_condition_conditional_logic_object": {
"conditionalLogic": {
"actionType": "show",
"logicType": "all",
"rules": [
{
"fieldId": "3",
"operator": "is",
"value": "2"
}
]
}
},
"scheduled": "0",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "",
"schedule_delay_unit": "hours",
"schedule_date_field_offset": "0",
"schedule_date_field_offset_unit": "hours",
"schedule_date_field_before_after": "after",
"type": "select",
"assignees": [
"user_id|1"
],
"routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"unanimous_approval": "",
"instructionsEnable": "0",
"instructionsValue": "Instructions: please review the values in the fields below and click on the Approve or Reject button",
"display_fields_mode": "all_fields",
"assignee_notification_enabled": "0",
"assignee_notification_from_name": "",
"assignee_notification_from_email": "{admin_email}",
"assignee_notification_reply_to": "",
"assignee_notification_bcc": "",
"assignee_notification_subject": "",
"assignee_notification_message": "A new entry is pending your approval. Please check your Workflow Inbox.",
"assignee_notification_disable_autoformat": "0",
"resend_assignee_emailEnable": "0",
"resend_assignee_emailValue": "7",
"resend_assignee_email_repeatEnable": "0",
"resend_assignee_email_repeatValue": "3",
"rejection_notification_enabled": "0",
"rejection_notification_type": "select",
"rejection_notification_routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"rejection_notification_from_name": "",
"rejection_notification_from_email": "{admin_email}",
"rejection_notification_reply_to": "",
"rejection_notification_bcc": "",
"rejection_notification_subject": "",
"rejection_notification_message": "Entry {entry_id} has been rejected",
"rejection_notification_disable_autoformat": "0",
"approval_notification_enabled": "0",
"approval_notification_type": "select",
"approval_notification_routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"approval_notification_from_name": "",
"approval_notification_from_email": "{admin_email}",
"approval_notification_reply_to": "",
"approval_notification_bcc": "",
"approval_notification_subject": "",
"approval_notification_message": "Entry {entry_id} has been approved",
"approval_notification_disable_autoformat": "0",
"note_mode": "not_required",
"expiration": "0",
"expiration_type": "delay",
"expiration_date": "",
"expiration_delay_offset": "",
"expiration_delay_unit": "hours",
"expiration_date_field_offset": "0",
"expiration_date_field_offset_unit": "hours",
"expiration_date_field_before_after": "after",
"status_expiration": "rejected",
"destination_expired": "next",
"destination_rejected": "complete",
"destination_approved": "next"
},
"addon_slug": "gravityflow",
"order": "0",
"feed_order": "0"
},
{
"id": "444",
"form_id": "184",
"is_active": "1",
"meta": {
"step_name": "Approval if User Field ID1",
"description": "",
"step_type": "approval",
"feed_condition_conditional_logic": "1",
"feed_condition_conditional_logic_object": {
"conditionalLogic": {
"actionType": "show",
"logicType": "all",
"rules": [
{
"fieldId": "3",
"operator": "is",
"value": "1"
}
]
}
},
"scheduled": "0",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "",
"schedule_delay_unit": "hours",
"schedule_date_field_offset": "0",
"schedule_date_field_offset_unit": "hours",
"schedule_date_field_before_after": "after",
"type": "select",
"assignees": [
"user_id|1"
],
"routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"unanimous_approval": "",
"instructionsEnable": "0",
"instructionsValue": "Instructions: please review the values in the fields below and click on the Approve or Reject button",
"display_fields_mode": "all_fields",
"assignee_notification_enabled": "0",
"assignee_notification_from_name": "",
"assignee_notification_from_email": "{admin_email}",
"assignee_notification_reply_to": "",
"assignee_notification_bcc": "",
"assignee_notification_subject": "",
"assignee_notification_message": "A new entry is pending your approval. Please check your Workflow Inbox.",
"assignee_notification_disable_autoformat": "0",
"resend_assignee_emailEnable": "0",
"resend_assignee_emailValue": "7",
"resend_assignee_email_repeatEnable": "0",
"resend_assignee_email_repeatValue": "3",
"rejection_notification_enabled": "0",
"rejection_notification_type": "select",
"rejection_notification_routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"rejection_notification_from_name": "",
"rejection_notification_from_email": "{admin_email}",
"rejection_notification_reply_to": "",
"rejection_notification_bcc": "",
"rejection_notification_subject": "",
"rejection_notification_message": "Entry {entry_id} has been rejected",
"rejection_notification_disable_autoformat": "0",
"approval_notification_enabled": "0",
"approval_notification_type": "select",
"approval_notification_routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"approval_notification_from_name": "",
"approval_notification_from_email": "{admin_email}",
"approval_notification_reply_to": "",
"approval_notification_bcc": "",
"approval_notification_subject": "",
"approval_notification_message": "Entry {entry_id} has been approved",
"approval_notification_disable_autoformat": "0",
"note_mode": "not_required",
"expiration": "0",
"expiration_type": "delay",
"expiration_date": "",
"expiration_delay_offset": "",
"expiration_delay_unit": "hours",
"expiration_date_field_offset": "0",
"expiration_date_field_offset_unit": "hours",
"expiration_date_field_before_after": "after",
"status_expiration": "rejected",
"destination_expired": "next",
"destination_rejected": "complete",
"destination_approved": "next"
},
"addon_slug": "gravityflow",
"order": "0",
"feed_order": "0"
}
]
}
},
"version": "2.3-dev-1"
}

View File

@@ -0,0 +1,660 @@
{
"0": {
"title": "0012 Test Revert User",
"description": "",
"labelPlacement": "top_label",
"descriptionPlacement": "below",
"button": {
"type": "text",
"text": "Submit",
"imageUrl": ""
},
"fields": [
{
"type": "text",
"id": 1,
"label": "Text field",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": 1,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"failed_validation": "",
"productField": "",
"enablePasswordInput": "",
"maxLength": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false,
"displayOnly": ""
},
{
"type": "select",
"id": 2,
"label": "Select box",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"choices": [
{
"text": "First Choice",
"value": "First Choice",
"isSelected": false,
"price": ""
},
{
"text": "Second Choice",
"value": "Second Choice",
"isSelected": false,
"price": ""
},
{
"text": "Third Choice",
"value": "Third Choice",
"isSelected": false,
"price": ""
}
],
"formId": 1,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"conditionalLogic": "",
"failed_validation": "",
"productField": "",
"enablePrice": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false,
"displayOnly": ""
},
{
"type": "page",
"id": 8,
"label": "",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"displayOnly": true,
"nextButton": {
"type": "text",
"text": "Next",
"imageUrl": "",
"conditionalLogic": null
},
"previousButton": {
"type": "text",
"text": "Previous",
"imageUrl": ""
},
"formId": 1,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": {
"actionType": "show",
"logicType": "all",
"rules": [
{
"fieldId": "2",
"operator": "is",
"value": "Second Choice"
}
]
},
"failed_validation": "",
"productField": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false
},
{
"type": "number",
"id": 4,
"label": "Number",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"numberFormat": "decimal_dot",
"formId": 1,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"enableCalculation": false,
"rangeMin": "",
"failed_validation": "",
"productField": "",
"rangeMax": "",
"displayOnly": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false
},
{
"type": "checkbox",
"id": 5,
"label": "Check box",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"choices": [
{
"text": "First Choice",
"value": "First Choice",
"isSelected": false,
"price": ""
},
{
"text": "Second Choice",
"value": "Second Choice",
"isSelected": false,
"price": ""
},
{
"text": "Third Choice",
"value": "Third Choice",
"isSelected": false,
"price": ""
}
],
"inputs": [
{
"id": "5.1",
"label": "First Choice",
"name": ""
},
{
"id": "5.2",
"label": "Second Choice",
"name": ""
},
{
"id": "5.3",
"label": "Third Choice",
"name": ""
}
],
"formId": 1,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"conditionalLogic": "",
"failed_validation": "",
"productField": "",
"enablePrice": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false,
"displayOnly": ""
},
{
"type": "textarea",
"id": 7,
"label": "Extra text",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": 1,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": {
"actionType": "show",
"logicType": "all",
"rules": [
{
"fieldId": "5",
"operator": "is",
"value": "Third Choice"
}
]
},
"failed_validation": "",
"productField": "",
"form_id": "",
"useRichTextEditor": false,
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"displayOnly": ""
}
],
"version": "2.0.6.3",
"id": 1,
"useCurrentUserAsAuthor": true,
"postContentTemplateEnabled": false,
"postTitleTemplateEnabled": false,
"postTitleTemplate": "",
"postContentTemplate": "",
"lastPageButton": {
"type": "text",
"text": "Previous",
"imageUrl": ""
},
"pagination": {
"type": "percentage",
"pages": [
"",
""
],
"style": "blue",
"backgroundColor": null,
"color": null,
"display_progressbar_on_confirmation": false,
"progressbar_completion_text": null
},
"firstPageCssClass": "",
"is_active": "1",
"date_created": "2016-08-22 08:12:44",
"is_trash": "0",
"confirmations": [
{
"id": "57baa7297dbfe",
"name": "Default Confirmation",
"isDefault": true,
"type": "message",
"message": "Thanks for contacting us! We will get in touch with you shortly.",
"url": "",
"pageId": "",
"queryString": ""
}
],
"notifications": [
{
"id": "57baa7297d4a8",
"to": "{admin_email}",
"name": "Admin Notification",
"event": "form_submission",
"toType": "email",
"subject": "New submission from {form_title}",
"message": "{all_fields}"
}
],
"feeds": {
"gravityflow": [
{
"id": "1",
"form_id": "1",
"is_active": "1",
"feed_order": "0",
"meta": {
"step_name": "First approval",
"description": "",
"step_type": "approval",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": [],
"scheduled": "0",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "",
"schedule_delay_unit": "hours",
"schedule_date_field_offset": "0",
"schedule_date_field_offset_unit": "hours",
"schedule_date_field_before_after": "after",
"type": "select",
"assignees": [
"user_id|1"
],
"routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"unanimous_approval": "",
"instructionsEnable": "0",
"instructionsValue": "Instructions: please review the values in the fields below and click on the Approve or Reject button",
"display_fields_mode": "all_fields",
"assignee_notification_enabled": "1",
"assignee_notification_from_name": "",
"assignee_notification_from_email": "{admin_email}",
"assignee_notification_reply_to": "",
"assignee_notification_bcc": "",
"assignee_notification_subject": "",
"assignee_notification_message": "A new entry is pending your approval. Please check your Workflow Inbox.",
"assignee_notification_disable_autoformat": "0",
"resend_assignee_emailEnable": "0",
"resend_assignee_emailValue": "7",
"rejection_notification_enabled": "1",
"rejection_notification_type": "select",
"rejection_notification_users": [
"role|subscriber"
],
"rejection_notification_routing": "",
"rejection_notification_from_name": "",
"rejection_notification_from_email": "{admin_email}",
"rejection_notification_reply_to": "",
"rejection_notification_bcc": "",
"rejection_notification_subject": "",
"rejection_notification_message": "Entry {entry_id} has been rejected",
"rejection_notification_disable_autoformat": "0",
"approval_notification_enabled": "0",
"approval_notification_type": "select",
"approval_notification_routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"approval_notification_from_name": "",
"approval_notification_from_email": "{admin_email}",
"approval_notification_reply_to": "",
"approval_notification_bcc": "",
"approval_notification_subject": "",
"approval_notification_message": "Entry {entry_id} has been approved",
"approval_notification_disable_autoformat": "0",
"revertEnable": "0",
"revertValue": "2",
"note_mode": "not_required",
"expiration": "0",
"expiration_type": "delay",
"expiration_date": "",
"expiration_delay_offset": "",
"expiration_delay_unit": "hours",
"status_expiration": "rejected",
"destination_expired": "next",
"destination_rejected": "complete",
"destination_approved": 2
},
"addon_slug": "gravityflow"
},
{
"id": "2",
"form_id": "1",
"is_active": "1",
"feed_order": "0",
"meta": {
"step_name": "Send for number check",
"description": "",
"step_type": "user_input",
"feed_condition_conditional_logic": "1",
"feed_condition_conditional_logic_object": {
"conditionalLogic": {
"actionType": "show",
"logicType": "all",
"rules": [
{
"fieldId": "2",
"operator": "is",
"value": "Second Choice"
}
]
}
},
"scheduled": "0",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "",
"schedule_delay_unit": "hours",
"schedule_date_field_offset": "0",
"schedule_date_field_offset_unit": "hours",
"schedule_date_field_before_after": "after",
"type": "select",
"assignees": [
"role|administrator"
],
"editable_fields": [
"4"
],
"routing": "",
"conditional_logic_editable_fields_enabled": "0",
"highlight_editable_fields_enabled": "0",
"highlight_editable_fields_class": "green-triangle",
"assignee_policy": "any",
"instructionsEnable": "0",
"instructionsValue": "",
"display_fields_mode": "all_fields",
"default_status": "hidden",
"note_mode": "not_required",
"assignee_notification_enabled": "1",
"assignee_notification_from_name": "",
"assignee_notification_from_email": "{admin_email}",
"assignee_notification_reply_to": "",
"assignee_notification_bcc": "",
"assignee_notification_subject": "",
"assignee_notification_message": "A new entry requires your input",
"assignee_notification_disable_autoformat": "0",
"resend_assignee_emailEnable": "0",
"resend_assignee_emailValue": "7",
"expiration": "0",
"expiration_type": "delay",
"expiration_date": "",
"expiration_delay_offset": "",
"expiration_delay_unit": "hours",
"status_expiration": "complete",
"destination_expired": "next",
"destination_complete": "3"
},
"addon_slug": "gravityflow"
},
{
"id": "3",
"form_id": "1",
"is_active": "1",
"feed_order": "0",
"meta": {
"step_name": "Final approval",
"description": "",
"step_type": "approval",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": {
"conditionalLogic": {
"actionType": "show",
"logicType": "all",
"rules": [
{
"fieldId": "1",
"operator": "is",
"value": ""
}
]
}
},
"scheduled": "0",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "",
"schedule_delay_unit": "hours",
"schedule_date_field_offset": "0",
"schedule_date_field_offset_unit": "hours",
"schedule_date_field_before_after": "after",
"type": "select",
"assignees": [
"user_id|1"
],
"routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"unanimous_approval": "",
"instructionsEnable": "0",
"instructionsValue": "Instructions: please review the values in the fields below and click on the Approve or Reject button",
"display_fields_mode": "all_fields",
"assignee_notification_enabled": "1",
"assignee_notification_from_name": "",
"assignee_notification_from_email": "{admin_email}",
"assignee_notification_reply_to": "",
"assignee_notification_bcc": "",
"assignee_notification_subject": "",
"assignee_notification_message": "A new entry is pending your approval. Please check your Workflow Inbox.",
"assignee_notification_disable_autoformat": "0",
"resend_assignee_emailEnable": "0",
"resend_assignee_emailValue": "7",
"rejection_notification_enabled": "1",
"rejection_notification_type": "select",
"rejection_notification_users": [
"role|subscriber"
],
"rejection_notification_routing": "",
"rejection_notification_from_name": "",
"rejection_notification_from_email": "{admin_email}",
"rejection_notification_reply_to": "",
"rejection_notification_bcc": "",
"rejection_notification_subject": "",
"rejection_notification_message": "Entry {entry_id} has been rejected",
"rejection_notification_disable_autoformat": "0",
"approval_notification_enabled": "1",
"approval_notification_type": "select",
"approval_notification_users": [
"role|subscriber"
],
"approval_notification_routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"approval_notification_from_name": "",
"approval_notification_from_email": "{admin_email}",
"approval_notification_reply_to": "",
"approval_notification_bcc": "",
"approval_notification_subject": "",
"approval_notification_message": "Entry {entry_id} has been approved",
"approval_notification_disable_autoformat": "0",
"revertEnable": "1",
"revertValue": "2",
"note_mode": "not_required",
"expiration": "0",
"expiration_type": "delay",
"expiration_date": "",
"expiration_delay_offset": "",
"expiration_delay_unit": "hours",
"status_expiration": "rejected",
"destination_expired": "next",
"destination_rejected": "complete",
"destination_approved": "complete"
},
"addon_slug": "gravityflow"
}
]
}
},
"version": "2.0.6.3"
}

View File

@@ -0,0 +1,553 @@
{
"0": {
"title": "0013 Total Depending On Quantity",
"description": "",
"labelPlacement": "top_label",
"descriptionPlacement": "below",
"button": {
"type": "text",
"text": "Submit",
"imageUrl": ""
},
"fields": [
{
"type": "text",
"id": 1,
"label": "Text field",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": 1,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"failed_validation": "",
"productField": "",
"enablePasswordInput": "",
"maxLength": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false,
"displayOnly": ""
},
{
"type": "textarea",
"id": 2,
"label": "Paragraph",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": 1,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"failed_validation": "",
"productField": "",
"form_id": "",
"useRichTextEditor": false,
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"displayOnly": ""
},
{
"type": "product",
"id": 4,
"label": "Product Price",
"adminLabel": "",
"isRequired": true,
"size": "medium",
"errorMessage": "",
"inputs": null,
"inputType": "radio",
"enablePrice": true,
"formId": 1,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": [
{
"text": "First Choice",
"value": "First Choice",
"isSelected": false,
"price": "$10.00"
},
{
"text": "Second Choice",
"value": "Second Choice",
"isSelected": false,
"price": "$20.00"
},
{
"text": "Third Choice",
"value": "Third Choice",
"isSelected": false,
"price": "$30.00"
}
],
"conditionalLogic": "",
"failed_validation": "",
"productField": "",
"basePrice": "$0.00",
"disableQuantity": false,
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"displayAllCategories": false,
"useRichTextEditor": false,
"displayOnly": ""
},
{
"type": "option",
"id": 5,
"label": "Option",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputType": "select",
"choices": [
{
"text": "Extra Small",
"value": "Extra Small",
"isSelected": false,
"price": ""
},
{
"text": "Small",
"value": "Small",
"isSelected": false,
"price": ""
},
{
"text": "Medium",
"value": "Medium",
"isSelected": false,
"price": ""
},
{
"text": "Large",
"value": "Large",
"isSelected": false,
"price": ""
},
{
"text": "Extra Large",
"value": "Extra Large",
"isSelected": false,
"price": ""
}
],
"enablePrice": true,
"productField": 4,
"formId": 1,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"inputs": "",
"conditionalLogic": "",
"failed_validation": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false,
"displayOnly": ""
},
{
"type": "quantity",
"id": 6,
"label": "Quantity",
"adminLabel": "",
"isRequired": true,
"size": "medium",
"errorMessage": "",
"inputType": "number",
"productField": 4,
"numberFormat": "decimal_dot",
"formId": 1,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"inputs": "",
"choices": "",
"conditionalLogic": "",
"enableCalculation": false,
"rangeMin": "",
"failed_validation": "",
"rangeMax": "",
"displayOnly": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false
},
{
"type": "shipping",
"id": 7,
"label": "Shipping",
"adminLabel": "",
"isRequired": true,
"size": "medium",
"errorMessage": "",
"inputs": null,
"inputType": "radio",
"enablePrice": true,
"formId": 1,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": [
{
"text": "First Choice",
"value": "First Choice",
"isSelected": false,
"price": "$2.00"
},
{
"text": "Second Choice",
"value": "Second Choice",
"isSelected": false,
"price": "$3.00"
},
{
"text": "Third Choice",
"value": "Third Choice",
"isSelected": false,
"price": "$4.00"
}
],
"conditionalLogic": "",
"basePrice": "$1.00",
"failed_validation": "",
"productField": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false,
"displayOnly": ""
},
{
"type": "total",
"id": 8,
"label": "Total",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": 1,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"failed_validation": "",
"productField": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false,
"displayOnly": ""
}
],
"version": "2.0.6.3",
"id": 1,
"useCurrentUserAsAuthor": true,
"postContentTemplateEnabled": false,
"postTitleTemplateEnabled": false,
"postTitleTemplate": "",
"postContentTemplate": "",
"lastPageButton": null,
"pagination": null,
"firstPageCssClass": null,
"confirmations": [
{
"id": "57baa7297dbfe",
"name": "Default Confirmation",
"isDefault": true,
"type": "message",
"message": "Thanks for contacting us! We will get in touch with you shortly.",
"url": "",
"pageId": "",
"queryString": ""
}
],
"notifications": [
{
"id": "57baa7297d4a8",
"to": "{admin_email}",
"name": "Admin Notification",
"event": "form_submission",
"toType": "email",
"subject": "New submission from {form_title}",
"message": "{all_fields}"
}
],
"feeds": {
"gravityflow": [
{
"id": "1",
"form_id": "1",
"is_active": "1",
"feed_order": "0",
"meta": {
"step_name": "Approval by all assignees",
"description": "",
"step_type": "approval",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": [],
"scheduled": "0",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "",
"schedule_delay_unit": "hours",
"schedule_date_field_offset": "0",
"schedule_date_field_offset_unit": "hours",
"schedule_date_field_before_after": "after",
"type": "select",
"assignees": [
"role|administrator"
],
"routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"unanimous_approval": "1",
"instructionsEnable": "0",
"instructionsValue": "Instructions: please review the values in the fields below and click on the Approve or Reject button",
"display_fields_mode": "all_fields",
"display_order_summary": "1",
"assignee_notification_enabled": "1",
"assignee_notification_from_name": "",
"assignee_notification_from_email": "{admin_email}",
"assignee_notification_reply_to": "",
"assignee_notification_bcc": "",
"assignee_notification_subject": "",
"assignee_notification_message": "A new entry is pending your approval. Please check your Workflow Inbox.",
"assignee_notification_disable_autoformat": "0",
"resend_assignee_emailEnable": "0",
"resend_assignee_emailValue": "7",
"rejection_notification_enabled": "1",
"rejection_notification_type": "select",
"rejection_notification_users": [
"user_id|1"
],
"rejection_notification_routing": "",
"rejection_notification_from_name": "",
"rejection_notification_from_email": "{admin_email}",
"rejection_notification_reply_to": "",
"rejection_notification_bcc": "",
"rejection_notification_subject": "",
"rejection_notification_message": "Entry {entry_id} has been rejected",
"rejection_notification_disable_autoformat": "0",
"approval_notification_enabled": "1",
"approval_notification_type": "select",
"approval_notification_users": [
"user_id|1"
],
"approval_notification_routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"approval_notification_from_name": "",
"approval_notification_from_email": "{admin_email}",
"approval_notification_reply_to": "",
"approval_notification_bcc": "",
"approval_notification_subject": "",
"approval_notification_message": "Entry {entry_id} has been approved",
"approval_notification_disable_autoformat": "0",
"revertEnable": "0",
"revertValue": "20",
"note_mode": "not_required",
"expiration": "1",
"expiration_type": "delay",
"expiration_date": "",
"expiration_delay_offset": "5",
"expiration_delay_unit": "minutes",
"status_expiration": "expired",
"destination_expired": "20",
"destination_rejected": "20",
"destination_approved": "complete"
},
"addon_slug": "gravityflow"
},
{
"id": "20",
"form_id": "1",
"is_active": "1",
"feed_order": "0",
"meta": {
"step_name": "Review quantity",
"description": "",
"step_type": "user_input",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": [],
"scheduled": "0",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "",
"schedule_delay_unit": "hours",
"schedule_date_field_offset": "0",
"schedule_date_field_offset_unit": "hours",
"schedule_date_field_before_after": "after",
"type": "select",
"assignees": [
"user_id|1"
],
"editable_fields": [
"6"
],
"routing": "",
"conditional_logic_editable_fields_enabled": "0",
"highlight_editable_fields_enabled": "0",
"highlight_editable_fields_class": "green-triangle",
"assignee_policy": "all",
"instructionsEnable": "0",
"instructionsValue": "",
"display_fields_mode": "all_fields",
"display_order_summary": "1",
"default_status": "hidden",
"note_mode": "not_required",
"assignee_notification_enabled": "1",
"assignee_notification_from_name": "",
"assignee_notification_from_email": "{admin_email}",
"assignee_notification_reply_to": "",
"assignee_notification_bcc": "",
"assignee_notification_subject": "",
"assignee_notification_message": "A new entry requires your input",
"assignee_notification_disable_autoformat": "0",
"resend_assignee_emailEnable": "0",
"resend_assignee_emailValue": "7",
"expiration": "0",
"expiration_type": "delay",
"expiration_date": "",
"expiration_delay_offset": "",
"expiration_delay_unit": "hours",
"status_expiration": "complete",
"destination_expired": "next",
"destination_complete": "1"
},
"addon_slug": "gravityflow"
}
]
}
},
"version": "2.0.6.3"
}

View File

@@ -0,0 +1,588 @@
{
"0": {
"title": "0014 Two Pages Rejected",
"description": "",
"labelPlacement": "top_label",
"descriptionPlacement": "below",
"button": {
"type": "text",
"text": "Submit",
"imageUrl": ""
},
"fields": [
{
"type": "radio",
"id": 7,
"label": "Radio",
"adminLabel": "Radio admin label",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"choices": [
{
"text": "First Choice",
"value": "First Choice",
"isSelected": false,
"price": ""
},
{
"text": "Second Choice",
"value": "Second Choice",
"isSelected": false,
"price": ""
},
{
"text": "Third Choice",
"value": "Third Choice",
"isSelected": false,
"price": ""
}
],
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"inputMask": false,
"inputMaskValue": "",
"allowsPrepopulate": false,
"formId": 2,
"description": "",
"inputType": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"conditionalLogic": "",
"displayOnly": "",
"useRichTextEditor": false
},
{
"type": "text",
"id": 25,
"label": "No conditional logic single line",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": 2,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"failed_validation": "",
"productField": "",
"enablePasswordInput": "",
"maxLength": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false,
"displayOnly": ""
},
{
"type": "section",
"id": 21,
"label": "Section Break",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"displayOnly": true,
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"inputMask": false,
"inputMaskValue": "",
"allowsPrepopulate": false,
"adminOnly": true,
"formId": 2,
"description": "",
"inputType": "",
"cssClass": "",
"inputName": "",
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"useRichTextEditor": false
},
{
"type": "textarea",
"id": 23,
"label": "Admin section - paragraph",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": 2,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"displayOnly": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false
},
{
"type": "text",
"id": 22,
"label": "Admin section - single line",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": 2,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"displayOnly": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false
},
{
"type": "page",
"id": 17,
"label": "",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"displayOnly": true,
"nextButton": {
"type": "text",
"text": "Next",
"imageUrl": ""
},
"previousButton": {
"type": "text",
"text": "Previous",
"imageUrl": ""
},
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"inputMask": false,
"inputMaskValue": "",
"allowsPrepopulate": false,
"conditionalLogic": false,
"formId": 2,
"description": "",
"inputType": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": ""
},
{
"type": "text",
"id": 18,
"label": "PAge 2 single line",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": 2,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": false,
"displayOnly": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false
},
{
"type": "select",
"id": 20,
"label": "Drop Down Page 2",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"choices": [
{
"text": "First Choice",
"value": "First Choice",
"isSelected": false,
"price": ""
},
{
"text": "Second Choice",
"value": "Second Choice",
"isSelected": false,
"price": ""
},
{
"text": "Third Choice",
"value": "Third Choice",
"isSelected": false,
"price": ""
}
],
"formId": 2,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"conditionalLogic": "",
"displayOnly": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false
}
],
"version": "2.0.6.3",
"id": 2,
"useCurrentUserAsAuthor": true,
"postContentTemplateEnabled": false,
"postTitleTemplateEnabled": false,
"postTitleTemplate": "",
"postContentTemplate": "",
"lastPageButton": {
"type": "text",
"text": "Previous",
"imageUrl": ""
},
"pagination": {
"type": "percentage",
"pages": [
"",
""
],
"style": "blue",
"backgroundColor": null,
"color": null,
"display_progressbar_on_confirmation": false,
"progressbar_completion_text": null
},
"firstPageCssClass": "",
"subLabelPlacement": "below",
"cssClass": "",
"enableHoneypot": false,
"enableAnimation": false,
"save": {
"enabled": false,
"button": {
"type": "link",
"text": "Save and Continue Later"
}
},
"limitEntries": false,
"limitEntriesCount": "",
"limitEntriesPeriod": "",
"limitEntriesMessage": "",
"scheduleForm": false,
"scheduleStart": "",
"scheduleStartHour": "",
"scheduleStartMinute": "",
"scheduleStartAmpm": "",
"scheduleEnd": "",
"scheduleEndHour": "",
"scheduleEndMinute": "",
"scheduleEndAmpm": "",
"schedulePendingMessage": "",
"scheduleMessage": "",
"requireLogin": false,
"requireLoginMessage": "",
"confirmations": [
{
"id": "568be7c1db3eb",
"name": "Default Confirmation",
"isDefault": true,
"type": "message",
"message": "Thanks for contacting us! We will get in touch with you shortly.",
"url": "",
"pageId": "",
"queryString": ""
}
],
"notifications": [
{
"id": "568be7c1dafd6",
"to": "{admin_email}",
"name": "Admin Notification",
"event": "form_submission",
"toType": "email",
"subject": "New submission from {form_title}",
"message": "{all_fields}",
"isActive": false
}
],
"feeds": {
"gravityflow": [
{
"id": "4",
"form_id": "2",
"is_active": "1",
"feed_order": "0",
"meta": {
"step_name": "Approval for two step form",
"description": "",
"step_type": "approval",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": [],
"scheduled": "0",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "",
"schedule_delay_unit": "hours",
"schedule_date_field_offset": "0",
"schedule_date_field_offset_unit": "hours",
"schedule_date_field_before_after": "after",
"type": "select",
"assignees": [
"user_id|1"
],
"routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"unanimous_approval": "",
"instructionsEnable": "0",
"instructionsValue": "Instructions: please review the values in the fields below and click on the Approve or Reject button",
"display_fields_mode": "all_fields",
"assignee_notification_enabled": "1",
"assignee_notification_from_name": "",
"assignee_notification_from_email": "{admin_email}",
"assignee_notification_reply_to": "",
"assignee_notification_bcc": "",
"assignee_notification_subject": "",
"assignee_notification_message": "A new entry is pending your approval. Please check your Workflow Inbox.",
"assignee_notification_disable_autoformat": "0",
"resend_assignee_emailEnable": "0",
"resend_assignee_emailValue": "7",
"rejection_notification_enabled": "1",
"rejection_notification_type": "select",
"rejection_notification_users": [
"role|subscriber"
],
"rejection_notification_routing": "",
"rejection_notification_from_name": "",
"rejection_notification_from_email": "{admin_email}",
"rejection_notification_reply_to": "",
"rejection_notification_bcc": "",
"rejection_notification_subject": "",
"rejection_notification_message": "Entry {entry_id} has been rejected",
"rejection_notification_disable_autoformat": "0",
"approval_notification_enabled": "1",
"approval_notification_type": "select",
"approval_notification_users": [
"role|subscriber"
],
"approval_notification_routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"approval_notification_from_name": "",
"approval_notification_from_email": "{admin_email}",
"approval_notification_reply_to": "",
"approval_notification_bcc": "",
"approval_notification_subject": "",
"approval_notification_message": "Entry {entry_id} has been approved",
"approval_notification_disable_autoformat": "0",
"revertEnable": "0",
"revertValue": "5",
"note_mode": "not_required",
"expiration": "0",
"expiration_type": "delay",
"expiration_date": "",
"expiration_delay_offset": "",
"expiration_delay_unit": "hours",
"status_expiration": "rejected",
"destination_expired": "next",
"destination_rejected": "5",
"destination_approved": "complete"
},
"addon_slug": "gravityflow"
},
{
"id": "5",
"form_id": "2",
"is_active": "1",
"feed_order": "0",
"meta": {
"step_name": "Rejected request",
"description": "",
"step_type": "user_input",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": [],
"scheduled": "0",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "",
"schedule_delay_unit": "hours",
"schedule_date_field_offset": "0",
"schedule_date_field_offset_unit": "hours",
"schedule_date_field_before_after": "after",
"type": "select",
"assignees": [
"user_id|1"
],
"editable_fields": [
"7",
"20"
],
"routing": "",
"highlight_editable_fields_enabled": "0",
"highlight_editable_fields_class": "green-triangle",
"assignee_policy": "all",
"instructionsEnable": "0",
"instructionsValue": "",
"display_fields_mode": "all_fields",
"default_status": "hidden",
"note_mode": "not_required",
"assignee_notification_enabled": "1",
"assignee_notification_from_name": "",
"assignee_notification_from_email": "{admin_email}",
"assignee_notification_reply_to": "",
"assignee_notification_bcc": "",
"assignee_notification_subject": "",
"assignee_notification_message": "A new entry requires your input",
"assignee_notification_disable_autoformat": "0",
"resend_assignee_emailEnable": "0",
"resend_assignee_emailValue": "7",
"expiration": "0",
"expiration_type": "delay",
"expiration_date": "",
"expiration_delay_offset": "",
"expiration_delay_unit": "hours",
"status_expiration": "complete",
"destination_expired": "next",
"destination_complete": "complete"
},
"addon_slug": "gravityflow"
}
]
}
},
"version": "2.0.6.3"
}

View File

@@ -0,0 +1,694 @@
{
"0": {
"title": "0015 User Input",
"description": "",
"labelPlacement": "top_label",
"descriptionPlacement": "below",
"button": {
"type": "text",
"text": "Submit",
"imageUrl": ""
},
"fields": [
{
"type": "html",
"id": 11,
"label": "HTML Block",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"displayOnly": true,
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"inputMask": false,
"inputMaskValue": "",
"allowsPrepopulate": false,
"content": "Entry Id: {entry_id}",
"formId": 15,
"description": "",
"inputType": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": ""
},
{
"type": "section",
"id": 12,
"label": "Section Break",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"displayOnly": true,
"formId": 15,
"description": "description",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"failed_validation": "",
"productField": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false
},
{
"type": "text",
"id": 1,
"label": "Single Line",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": 15,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": true,
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"displayOnly": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"maxLength": "100"
},
{
"type": "number",
"id": 9,
"label": "Number",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"numberFormat": "decimal_dot",
"formId": 15,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": {
"actionType": "show",
"logicType": "all",
"rules": [
{
"fieldId": "1",
"operator": "is",
"value": ""
}
]
},
"enableCalculation": false,
"rangeMin": "",
"displayOnly": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"disableQuantity": false,
"displayAllCategories": false
},
{
"type": "textarea",
"id": 2,
"label": "Paragraph",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": 15,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"displayOnly": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false
},
{
"type": "number",
"id": 10,
"label": "Calc",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"numberFormat": "decimal_dot",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "{Number:5} + {Number:9}",
"calculationRounding": "",
"enableCalculation": true,
"disableQuantity": false,
"displayAllCategories": false,
"inputMask": false,
"inputMaskValue": "",
"allowsPrepopulate": false,
"formId": 15,
"description": "",
"inputType": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"rangeMin": "",
"displayOnly": ""
},
{
"type": "email",
"id": 8,
"label": "Email",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": 15,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"displayOnly": ""
},
{
"type": "select",
"id": 3,
"label": "Dropdown",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"choices": [
{
"text": "First Choice",
"value": "First Choice",
"isSelected": false,
"price": ""
},
{
"text": "Second Choice",
"value": "Second Choice",
"isSelected": false,
"price": ""
},
{
"text": "Third Choice",
"value": "Third Choice",
"isSelected": false,
"price": ""
}
],
"formId": 15,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"conditionalLogic": "",
"displayOnly": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false
},
{
"type": "multiselect",
"id": 4,
"label": "Multiselect",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"choices": [
{
"text": "First Choice",
"value": "First Choice",
"isSelected": false,
"price": ""
},
{
"text": "Second Choice",
"value": "Second Choice",
"isSelected": false,
"price": ""
},
{
"text": "Third Choice",
"value": "Third Choice",
"isSelected": false,
"price": ""
}
],
"formId": 15,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"conditionalLogic": "",
"enableEnhancedUI": false,
"displayOnly": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false
},
{
"type": "number",
"id": 5,
"label": "Number",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"numberFormat": "decimal_dot",
"formId": 15,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"enableCalculation": false,
"rangeMin": "",
"displayOnly": ""
},
{
"type": "checkbox",
"id": 6,
"label": "Checkboxes",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"choices": [
{
"text": "First Choice",
"value": "First Choice",
"isSelected": false,
"price": ""
},
{
"text": "Second Choice",
"value": "Second Choice",
"isSelected": false,
"price": ""
},
{
"text": "Third Choice",
"value": "Third Choice",
"isSelected": false,
"price": ""
}
],
"inputs": [
{
"id": "6.1",
"label": "First Choice",
"name": ""
},
{
"id": "6.2",
"label": "Second Choice",
"name": ""
},
{
"id": "6.3",
"label": "Third Choice",
"name": ""
}
],
"formId": 15,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"conditionalLogic": "",
"displayOnly": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false
},
{
"type": "radio",
"id": 7,
"label": "Radio",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"choices": [
{
"text": "First Choice",
"value": "First Choice",
"isSelected": false,
"price": ""
},
{
"text": "Second Choice",
"value": "Second Choice",
"isSelected": false,
"price": ""
},
{
"text": "Third Choice",
"value": "Third Choice",
"isSelected": false,
"price": ""
}
],
"formId": 15,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"conditionalLogic": "",
"displayOnly": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false
},
{
"type": "radio",
"id": 13,
"label": "Admin only radio required",
"adminLabel": "",
"isRequired": true,
"size": "medium",
"errorMessage": "",
"inputs": null,
"choices": [
{
"text": "First Choice",
"value": "First Choice",
"isSelected": false,
"price": ""
},
{
"text": "Second Choice",
"value": "Second Choice",
"isSelected": false,
"price": ""
},
{
"text": "Third Choice",
"value": "Third Choice",
"isSelected": false,
"price": ""
}
],
"formId": 15,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": true,
"noDuplicates": false,
"defaultValue": "",
"conditionalLogic": "",
"failed_validation": "",
"productField": "",
"enableOtherChoice": "",
"enablePrice": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false
}
],
"version": "2.0.6.2",
"id": 15,
"useCurrentUserAsAuthor": true,
"postContentTemplateEnabled": false,
"postTitleTemplateEnabled": false,
"postTitleTemplate": "",
"postContentTemplate": "",
"lastPageButton": null,
"pagination": null,
"firstPageCssClass": null,
"confirmations": [
{
"id": "5660212ec90cb",
"name": "Default Confirmation",
"isDefault": true,
"type": "message",
"message": "Thanks for contacting us! We will get in touch with you shortly.",
"url": "",
"pageId": "",
"queryString": ""
}
],
"notifications": [
{
"id": "5660212ec8bee",
"to": "{admin_email}",
"name": "Admin Notification",
"event": "form_submission",
"toType": "email",
"subject": "New submission from {form_title}",
"message": "{all_fields}",
"isActive": false
}
],
"feeds": {
"gravityflow": [
{
"id": "35",
"form_id": "15",
"is_active": "1",
"meta": {
"step_name": "User Input",
"description": "Send to the admin user to enter values for the Paragraph field and the Dropdown field.",
"step_type": "user_input",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": [],
"scheduled": "0",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "",
"schedule_delay_unit": "hours",
"schedule_date_field_offset": "0",
"schedule_date_field_offset_unit": "hours",
"schedule_date_field_before_after": "after",
"type": "select",
"assignees": [
"user_id|1"
],
"editable_fields": [
"2",
"3",
"13"
],
"routing": "",
"conditional_logic_editable_fields_enabled": "0",
"highlight_editable_fields_enabled": "0",
"highlight_editable_fields_class": "green-triangle",
"assignee_policy": "all",
"instructionsEnable": "0",
"instructionsValue": "",
"display_fields_mode": "all_fields",
"default_status": "in_progress",
"note_mode": "not_required",
"assignee_notification_enabled": "0",
"assignee_notification_from_name": "",
"assignee_notification_from_email": "{admin_email}",
"assignee_notification_reply_to": "",
"assignee_notification_bcc": "",
"assignee_notification_subject": "",
"assignee_notification_message": "A new entry requires your input\r\n\r\n{workflow_entry_link: page_id=15 token=true}",
"assignee_notification_disable_autoformat": "0",
"resend_assignee_emailEnable": "0",
"resend_assignee_emailValue": "7",
"expiration": "0",
"expiration_type": "delay",
"expiration_date": "",
"expiration_delay_offset": "",
"expiration_delay_unit": "hours",
"status_expiration": "complete",
"destination_expired": "next",
"destination_complete": "next"
},
"addon_slug": "gravityflow",
"order": "0",
"feed_order": "0"
}
]
}
},
"version": "2.0.6.2"
}

View File

@@ -0,0 +1,734 @@
{
"0": {
"title": "0016 Vacation Request",
"description": "",
"labelPlacement": "top_label",
"descriptionPlacement": "below",
"button": {
"type": "text",
"text": "Submit",
"imageUrl": ""
},
"fields": [
{
"type": "name",
"id": 1,
"label": "Name",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"nameFormat": "advanced",
"inputs": [
{
"id": "1.2",
"label": "Prefix",
"name": "",
"choices": [
{
"text": "Mr.",
"value": "Mr.",
"isSelected": false,
"price": ""
},
{
"text": "Mrs.",
"value": "Mrs.",
"isSelected": false,
"price": ""
},
{
"text": "Miss",
"value": "Miss",
"isSelected": false,
"price": ""
},
{
"text": "Ms.",
"value": "Ms.",
"isSelected": false,
"price": ""
},
{
"text": "Dr.",
"value": "Dr.",
"isSelected": false,
"price": ""
},
{
"text": "Prof.",
"value": "Prof.",
"isSelected": false,
"price": ""
},
{
"text": "Rev.",
"value": "Rev.",
"isSelected": false,
"price": ""
}
],
"isHidden": true,
"inputType": "radio"
},
{
"id": "1.3",
"label": "First",
"name": ""
},
{
"id": "1.4",
"label": "Middle",
"name": "",
"isHidden": true
},
{
"id": "1.6",
"label": "Last",
"name": ""
},
{
"id": "1.8",
"label": "Suffix",
"name": "",
"isHidden": true
}
],
"formId": 3,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"failed_validation": "",
"productField": "",
"displayOnly": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false
},
{
"type": "select",
"id": 2,
"label": "Dep",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"choices": [
{
"text": "First Choice",
"value": "First Choice",
"isSelected": false,
"price": ""
},
{
"text": "Second Choice",
"value": "Second Choice",
"isSelected": false,
"price": ""
},
{
"text": "Third Choice",
"value": "Third Choice",
"isSelected": false,
"price": ""
}
],
"formId": 3,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"conditionalLogic": "",
"failed_validation": "",
"productField": "",
"enablePrice": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false,
"displayOnly": ""
},
{
"type": "text",
"id": 6,
"label": "First choice text",
"adminLabel": "",
"isRequired": true,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": 3,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": {
"actionType": "show",
"logicType": "any",
"rules": [
{
"fieldId": "2",
"operator": "is",
"value": "First Choice"
}
]
},
"failed_validation": "",
"productField": "",
"enablePasswordInput": "",
"maxLength": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false,
"displayOnly": ""
},
{
"type": "text",
"id": 7,
"label": "Second choice text",
"adminLabel": "",
"isRequired": true,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": 3,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": {
"actionType": "show",
"logicType": "any",
"rules": [
{
"fieldId": "2",
"operator": "is",
"value": "Second Choice"
}
]
},
"failed_validation": "",
"productField": "",
"enablePasswordInput": "",
"maxLength": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false,
"displayOnly": ""
},
{
"type": "text",
"id": 8,
"label": "Third choice text",
"adminLabel": "",
"isRequired": true,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": 3,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": {
"actionType": "show",
"logicType": "any",
"rules": [
{
"fieldId": "2",
"operator": "is",
"value": "Third Choice"
}
]
},
"failed_validation": "",
"productField": "",
"enablePasswordInput": "",
"maxLength": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false,
"displayOnly": ""
},
{
"type": "date",
"id": 3,
"label": "Date from",
"adminLabel": "",
"isRequired": true,
"size": "medium",
"errorMessage": "",
"inputs": null,
"dateType": "datepicker",
"calendarIconType": "none",
"formId": 3,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"calendarIconUrl": "",
"dateFormat": "",
"failed_validation": "",
"productField": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false,
"displayOnly": ""
},
{
"type": "date",
"id": 4,
"label": "Date to",
"adminLabel": "",
"isRequired": true,
"size": "medium",
"errorMessage": "",
"inputs": null,
"dateType": "datepicker",
"calendarIconType": "none",
"formId": 3,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"calendarIconUrl": "",
"dateFormat": "",
"failed_validation": "",
"productField": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false,
"displayOnly": ""
},
{
"type": "textarea",
"id": 5,
"label": "Comments",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": 3,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"failed_validation": "",
"productField": "",
"form_id": "",
"useRichTextEditor": false,
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"displayOnly": ""
}
],
"version": "2.0.6.3",
"id": 3,
"useCurrentUserAsAuthor": true,
"postContentTemplateEnabled": false,
"postTitleTemplateEnabled": false,
"postTitleTemplate": "",
"postContentTemplate": "",
"lastPageButton": null,
"pagination": null,
"firstPageCssClass": null,
"feeds": {
"gravityflow": [
{
"id": "4",
"form_id": "3",
"is_active": "1",
"feed_order": "0",
"meta": {
"step_name": "Send for approval",
"description": "",
"step_type": "approval",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": {
"conditionalLogic": {
"actionType": "show",
"logicType": "all",
"rules": [
{
"fieldId": "1.3",
"operator": "is",
"value": ""
}
]
}
},
"scheduled": "0",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "",
"schedule_delay_unit": "hours",
"schedule_date_field_offset": "0",
"schedule_date_field_offset_unit": "hours",
"schedule_date_field_before_after": "after",
"schedule_date_field": "4",
"type": "routing",
"assignees": [
"user_id|1"
],
"routing": [
{
"target": false,
"fieldId": "2",
"operator": "is",
"value": "First Choice",
"type": false,
"assignee": "user_id|1"
},
{
"target": false,
"fieldId": "2",
"operator": "is",
"value": "Second Choice",
"type": false,
"assignee": "user_id|1"
},
{
"target": false,
"fieldId": "2",
"operator": "is",
"value": "Third Choice",
"type": false,
"assignee": "role|administrator"
}
],
"unanimous_approval": "",
"instructionsEnable": "1",
"instructionsValue": "Instructions: please review the values in the fields below and click on the Approve or Reject button",
"display_fields_mode": "all_fields",
"assignee_notification_enabled": "1",
"assignee_notification_from_name": "{Name (First):1.3}{Name (Last):1.6}",
"assignee_notification_from_email": "{user:user_email}",
"assignee_notification_reply_to": "",
"assignee_notification_bcc": "",
"assignee_notification_subject": "Vacation request {entry_id} from {Name (First):1.3}{Name (Last):1.6}",
"assignee_notification_message": "A new entry is pending your approval. Please check your Workflow Inbox.\r\n\r\n{all_fields}",
"assignee_notification_disable_autoformat": "0",
"resend_assignee_emailEnable": "1",
"resend_assignee_emailValue": "7",
"rejection_notification_enabled": "1",
"rejection_notification_type": "select",
"rejection_notification_users": [
"role|subscriber"
],
"rejection_notification_routing": [
{
"target": false,
"fieldId": "0",
"operator": "is",
"value": "",
"type": false,
"assignee": "user_id|1"
}
],
"rejection_notification_from_name": "Manager",
"rejection_notification_from_email": "{admin_email}",
"rejection_notification_reply_to": "",
"rejection_notification_bcc": "",
"rejection_notification_subject": "Entry rejected",
"rejection_notification_message": "Entry {entry_id} has been rejected",
"rejection_notification_disable_autoformat": "0",
"approval_notification_enabled": "1",
"approval_notification_type": "select",
"approval_notification_users": [
"role|subscriber"
],
"approval_notification_routing": [
{
"assignee": "user_id|10",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"approval_notification_from_name": "Manager",
"approval_notification_from_email": "{admin_email}",
"approval_notification_reply_to": "",
"approval_notification_bcc": "",
"approval_notification_subject": "Entry approved",
"approval_notification_message": "Entry {entry_id} has been approved",
"approval_notification_disable_autoformat": "0",
"revertEnable": "0",
"revertValue": "20",
"note_mode": "not_required",
"expiration": "0",
"expiration_type": "delay",
"expiration_date": "",
"expiration_delay_offset": "",
"expiration_delay_unit": "hours",
"status_expiration": "rejected",
"destination_expired": "next",
"destination_rejected": "20",
"destination_approved": "25"
},
"addon_slug": "gravityflow"
},
{
"id": "20",
"form_id": "3",
"is_active": "1",
"feed_order": "0",
"meta": {
"step_name": "Review dates",
"description": "",
"step_type": "user_input",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": [],
"scheduled": "0",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "",
"schedule_delay_unit": "hours",
"schedule_date_field_offset": "0",
"schedule_date_field_offset_unit": "hours",
"schedule_date_field_before_after": "after",
"schedule_date_field": "3",
"type": "select",
"assignees": [
"role|subscriber"
],
"editable_fields": [
"4"
],
"routing": "",
"highlight_editable_fields_enabled": "0",
"highlight_editable_fields_class": "green-triangle",
"assignee_policy": "all",
"instructionsEnable": "0",
"instructionsValue": "",
"display_fields_mode": "all_fields",
"default_status": "hidden",
"note_mode": "not_required",
"assignee_notification_enabled": "1",
"assignee_notification_from_name": "Manager",
"assignee_notification_from_email": "{admin_email}",
"assignee_notification_reply_to": "",
"assignee_notification_bcc": "",
"assignee_notification_subject": "",
"assignee_notification_message": "Please review the dates.\r\n\r\nNotes from manager:\r\n{workflow_note}",
"assignee_notification_disable_autoformat": "0",
"resend_assignee_emailEnable": "0",
"resend_assignee_emailValue": "7",
"expiration": "0",
"expiration_type": "delay",
"expiration_date": "",
"expiration_delay_offset": "",
"expiration_delay_unit": "hours",
"status_expiration": "complete",
"destination_expired": "next",
"destination_complete": "4"
},
"addon_slug": "gravityflow"
},
{
"id": "25",
"form_id": "3",
"is_active": "1",
"feed_order": "0",
"meta": {
"step_name": "Vacation days approved",
"description": "",
"step_type": "notification",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": [],
"scheduled": "0",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "",
"schedule_delay_unit": "hours",
"schedule_date_field_offset": "0",
"schedule_date_field_offset_unit": "hours",
"schedule_date_field_before_after": "after",
"schedule_date_field": "3",
"notification_id_57b46011d910c": "0",
"workflow_notification_enabled": "1",
"workflow_notification_type": "select",
"workflow_notification_users": [
"role|subscriber"
],
"workflow_notification_routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"workflow_notification_from_name": "Manager",
"workflow_notification_from_email": "{admin_email}",
"workflow_notification_reply_to": "",
"workflow_notification_bcc": "",
"workflow_notification_subject": "",
"workflow_notification_message": "Your request have been approved.",
"workflow_notification_disable_autoformat": "0",
"destination_complete": "complete"
},
"addon_slug": "gravityflow"
}
]
},
"confirmations": [
{
"id": "57b46011d94d9",
"name": "Default Confirmation",
"isDefault": true,
"type": "message",
"message": "Thanks for contacting us! We will get in touch with you shortly.",
"url": "",
"pageId": "",
"queryString": ""
}
],
"notifications": [
{
"id": "57b46011d910c",
"to": "{admin_email}",
"name": "Admin Notification",
"event": "form_submission",
"toType": "email",
"subject": "New submission from {form_title}",
"message": "{all_fields}"
}
]
},
"version": "2.0.6.3"
}

View File

@@ -0,0 +1,331 @@
{
"0": {
"title": "0017 Workflow Required Fields",
"description": "",
"labelPlacement": "top_label",
"descriptionPlacement": "below",
"button": {
"type": "text",
"text": "Submit",
"imageUrl": ""
},
"fields": [
{
"type": "text",
"id": 2,
"label": "Simple text",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": 2,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"failed_validation": "",
"productField": "",
"enablePasswordInput": "",
"maxLength": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false
},
{
"type": "textarea",
"id": 1,
"label": "Pharagraph",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": 2,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"adminOnly": false,
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"failed_validation": "",
"productField": "",
"form_id": "",
"useRichTextEditor": false,
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false
}
],
"version": "2.0.6.3",
"id": 2,
"useCurrentUserAsAuthor": true,
"postContentTemplateEnabled": false,
"postTitleTemplateEnabled": false,
"postTitleTemplate": "",
"postContentTemplate": "",
"lastPageButton": null,
"pagination": null,
"firstPageCssClass": null,
"confirmations": [
{
"id": "57bc4725447b3",
"name": "Default Confirmation",
"isDefault": true,
"type": "message",
"message": "Thanks for contacting us! We will get in touch with you shortly.",
"url": "",
"pageId": "",
"queryString": ""
}
],
"notifications": [
{
"id": "57bc47254443a",
"to": "{admin_email}",
"name": "Admin Notification",
"event": "form_submission",
"toType": "email",
"subject": "New submission from {form_title}",
"message": "{all_fields}"
}
],
"feeds": {
"gravityflow": [
{
"id": "5",
"form_id": "2",
"is_active": "1",
"feed_order": "0",
"meta": {
"step_name": "Approve with note",
"description": "",
"step_type": "approval",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": {
"conditionalLogic": {
"actionType": "show",
"logicType": "all",
"rules": [
{
"fieldId": "2",
"operator": "isnot",
"value": ""
},
{
"fieldId": "1",
"operator": "isnot",
"value": ""
}
]
}
},
"scheduled": "0",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "",
"schedule_delay_unit": "hours",
"schedule_date_field_offset": "0",
"schedule_date_field_offset_unit": "hours",
"schedule_date_field_before_after": "after",
"type": "select",
"assignees": [
"user_id|1"
],
"routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"unanimous_approval": "",
"instructionsEnable": "1",
"instructionsValue": "Instructions: please review the values in the fields below and click on the Approve or Reject button",
"display_fields_mode": "all_fields",
"assignee_notification_enabled": "0",
"assignee_notification_from_name": "",
"assignee_notification_from_email": "{admin_email}",
"assignee_notification_reply_to": "",
"assignee_notification_bcc": "",
"assignee_notification_subject": "",
"assignee_notification_message": "A new entry is pending your approval. Please check your Workflow Inbox.",
"assignee_notification_disable_autoformat": "0",
"resend_assignee_emailEnable": "0",
"resend_assignee_emailValue": "7",
"rejection_notification_enabled": "0",
"rejection_notification_type": "select",
"rejection_notification_routing": "",
"rejection_notification_from_name": "",
"rejection_notification_from_email": "{admin_email}",
"rejection_notification_reply_to": "",
"rejection_notification_bcc": "",
"rejection_notification_subject": "",
"rejection_notification_message": "Entry {entry_id} has been rejected",
"rejection_notification_disable_autoformat": "0",
"approval_notification_enabled": "0",
"approval_notification_type": "select",
"approval_notification_routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"approval_notification_from_name": "",
"approval_notification_from_email": "{admin_email}",
"approval_notification_reply_to": "",
"approval_notification_bcc": "",
"approval_notification_subject": "",
"approval_notification_message": "Entry {entry_id} has been approved",
"approval_notification_disable_autoformat": "0",
"revertEnable": "0",
"revertValue": "6",
"note_mode": "required",
"expiration": "0",
"expiration_type": "delay",
"expiration_date": "",
"expiration_delay_offset": "",
"expiration_delay_unit": "hours",
"status_expiration": "rejected",
"destination_expired": "next",
"destination_rejected": "complete",
"destination_approved": "next"
},
"addon_slug": "gravityflow"
},
{
"id": "6",
"form_id": "2",
"is_active": "1",
"feed_order": "0",
"meta": {
"step_name": "Editable fields",
"description": "",
"step_type": "user_input",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": [],
"scheduled": "0",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "",
"schedule_delay_unit": "hours",
"schedule_date_field_offset": "0",
"schedule_date_field_offset_unit": "hours",
"schedule_date_field_before_after": "after",
"type": "select",
"assignees": [
"user_id|1"
],
"editable_fields": [
"2",
"1"
],
"routing": "",
"highlight_editable_fields_enabled": "1",
"highlight_editable_fields_class": "green-background",
"assignee_policy": "any",
"instructionsEnable": "1",
"instructionsValue": "Editable instructions.",
"display_fields_mode": "all_fields",
"default_status": "in_progress",
"note_mode": "required_if_in_progress",
"assignee_notification_enabled": "0",
"assignee_notification_from_name": "",
"assignee_notification_from_email": "{admin_email}",
"assignee_notification_reply_to": "",
"assignee_notification_bcc": "",
"assignee_notification_subject": "",
"assignee_notification_message": "A new entry requires your input",
"assignee_notification_disable_autoformat": "0",
"resend_assignee_emailEnable": "0",
"resend_assignee_emailValue": "7",
"expiration": "0",
"expiration_type": "delay",
"expiration_date": "",
"expiration_delay_offset": "",
"expiration_delay_unit": "hours",
"status_expiration": "complete",
"destination_expired": "next",
"destination_complete": "next"
},
"addon_slug": "gravityflow"
},
{
"id": "7",
"form_id": "2",
"is_active": "1",
"feed_order": "0",
"meta": {
"step_name": "Get JSON",
"description": "",
"step_type": "webhook",
"feed_condition_conditional_logic": "1",
"feed_condition_conditional_logic_object": {
"conditionalLogic": {
"actionType": "show",
"logicType": "all",
"rules": [
{
"fieldId": "2",
"operator": "contains",
"value": "Text"
}
]
}
},
"scheduled": "0",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "",
"schedule_delay_unit": "hours",
"schedule_date_field_offset": "0",
"schedule_date_field_offset_unit": "hours",
"schedule_date_field_before_after": "after",
"url": "http:\/\/ip.jsontest.com\/",
"method": "get",
"format": "json",
"destination_complete": "complete"
},
"addon_slug": "gravityflow"
}
]
}
},
"version": "2.0.6.3"
}

View File

@@ -0,0 +1,735 @@
{
"0": {
"title": "0018 Vacation Request Reject Note",
"description": "",
"labelPlacement": "top_label",
"descriptionPlacement": "below",
"button": {
"type": "text",
"text": "Submit",
"imageUrl": ""
},
"fields": [
{
"type": "name",
"id": 1,
"label": "Name",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"nameFormat": "advanced",
"inputs": [
{
"id": "1.2",
"label": "Prefix",
"name": "",
"choices": [
{
"text": "Mr.",
"value": "Mr.",
"isSelected": false,
"price": ""
},
{
"text": "Mrs.",
"value": "Mrs.",
"isSelected": false,
"price": ""
},
{
"text": "Miss",
"value": "Miss",
"isSelected": false,
"price": ""
},
{
"text": "Ms.",
"value": "Ms.",
"isSelected": false,
"price": ""
},
{
"text": "Dr.",
"value": "Dr.",
"isSelected": false,
"price": ""
},
{
"text": "Prof.",
"value": "Prof.",
"isSelected": false,
"price": ""
},
{
"text": "Rev.",
"value": "Rev.",
"isSelected": false,
"price": ""
}
],
"isHidden": true,
"inputType": "radio"
},
{
"id": "1.3",
"label": "First",
"name": ""
},
{
"id": "1.4",
"label": "Middle",
"name": "",
"isHidden": true
},
{
"id": "1.6",
"label": "Last",
"name": ""
},
{
"id": "1.8",
"label": "Suffix",
"name": "",
"isHidden": true
}
],
"formId": 5,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"productField": "",
"displayOnly": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false,
"visibility": "visible"
},
{
"type": "select",
"id": 2,
"label": "Dep",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"choices": [
{
"text": "First Choice",
"value": "First Choice",
"isSelected": false,
"price": ""
},
{
"text": "Second Choice",
"value": "Second Choice",
"isSelected": false,
"price": ""
},
{
"text": "Third Choice",
"value": "Third Choice",
"isSelected": false,
"price": ""
}
],
"formId": 5,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"noDuplicates": false,
"defaultValue": "",
"conditionalLogic": "",
"productField": "",
"enablePrice": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false,
"displayOnly": "",
"visibility": "visible"
},
{
"type": "text",
"id": 6,
"label": "First choice text",
"adminLabel": "",
"isRequired": true,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": 5,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": {
"actionType": "show",
"logicType": "any",
"rules": [
{
"fieldId": "2",
"operator": "is",
"value": "First Choice"
}
]
},
"productField": "",
"enablePasswordInput": "",
"maxLength": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false,
"displayOnly": "",
"visibility": "visible"
},
{
"type": "text",
"id": 7,
"label": "Second choice text",
"adminLabel": "",
"isRequired": true,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": 5,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": {
"actionType": "show",
"logicType": "any",
"rules": [
{
"fieldId": "2",
"operator": "is",
"value": "Second Choice"
}
]
},
"productField": "",
"enablePasswordInput": "",
"maxLength": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false,
"displayOnly": "",
"visibility": "visible"
},
{
"type": "text",
"id": 8,
"label": "Third choice text",
"adminLabel": "",
"isRequired": true,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": 5,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": {
"actionType": "show",
"logicType": "any",
"rules": [
{
"fieldId": "2",
"operator": "is",
"value": "Third Choice"
}
]
},
"productField": "",
"enablePasswordInput": "",
"maxLength": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false,
"displayOnly": "",
"visibility": "visible"
},
{
"type": "date",
"id": 3,
"label": "Date from",
"adminLabel": "",
"isRequired": true,
"size": "medium",
"errorMessage": "",
"inputs": null,
"dateType": "datepicker",
"calendarIconType": "none",
"formId": 5,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"calendarIconUrl": "",
"dateFormat": "",
"productField": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false,
"displayOnly": "",
"visibility": "visible"
},
{
"type": "date",
"id": 4,
"label": "Date to",
"adminLabel": "",
"isRequired": true,
"size": "medium",
"errorMessage": "",
"inputs": null,
"dateType": "datepicker",
"calendarIconType": "none",
"formId": 5,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"calendarIconUrl": "",
"dateFormat": "",
"productField": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false,
"displayOnly": "",
"visibility": "visible"
},
{
"type": "textarea",
"id": 5,
"label": "Comments",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": 5,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"productField": "",
"form_id": "",
"useRichTextEditor": false,
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"displayOnly": "",
"visibility": "visible"
}
],
"version": "2.0.6.3",
"id": 5,
"useCurrentUserAsAuthor": true,
"postContentTemplateEnabled": false,
"postTitleTemplateEnabled": false,
"postTitleTemplate": "",
"postContentTemplate": "",
"lastPageButton": null,
"pagination": null,
"firstPageCssClass": null,
"is_active": "1",
"date_created": "2017-11-16 10:45:56",
"is_trash": "0",
"confirmations": [
{
"id": "57b46011d94d9",
"name": "Default Confirmation",
"isDefault": true,
"type": "message",
"message": "Thanks for contacting us! We will get in touch with you shortly.",
"url": "",
"pageId": "",
"queryString": ""
}
],
"notifications": [
{
"id": "57b46011d910c",
"to": "{admin_email}",
"name": "Admin Notification",
"event": "form_submission",
"toType": "email",
"subject": "New submission from {form_title}",
"message": "{all_fields}"
}
],
"feeds": {
"gravityflow": [
{
"id": "4",
"form_id": "5",
"is_active": "1",
"feed_order": "0",
"meta": {
"step_name": "Send for approval",
"description": "",
"step_type": "approval",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": {
"conditionalLogic": {
"actionType": "show",
"logicType": "all",
"rules": [
{
"fieldId": "1.3",
"operator": "is",
"value": ""
}
]
}
},
"scheduled": "0",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "",
"schedule_delay_unit": "hours",
"schedule_date_field_offset": "0",
"schedule_date_field_offset_unit": "hours",
"schedule_date_field_before_after": "after",
"schedule_date_field": "4",
"type": "routing",
"assignees": [
"user_id|1"
],
"routing": [
{
"target": false,
"fieldId": "2",
"operator": "is",
"value": "First Choice",
"type": false,
"assignee": "user_id|1"
},
{
"target": false,
"fieldId": "2",
"operator": "is",
"value": "Second Choice",
"type": false,
"assignee": "user_id|1"
},
{
"target": false,
"fieldId": "2",
"operator": "is",
"value": "Third Choice",
"type": false,
"assignee": "role|administrator"
}
],
"assignee_policy": "all",
"instructionsEnable": "1",
"instructionsValue": "Instructions: please review the values in the fields below and click on the Approve or Reject button",
"display_fields_mode": "all_fields",
"assignee_notification_enabled": "1",
"assignee_notification_from_name": "{Name (First):1.3}{Name (Last):1.6}",
"assignee_notification_from_email": "{user:user_email}",
"assignee_notification_reply_to": "",
"assignee_notification_bcc": "",
"assignee_notification_subject": "Vacation request {entry_id} from {Name (First):1.3}{Name (Last):1.6}",
"assignee_notification_message": "A new entry is pending your approval. Please check your Workflow Inbox.\r\n\r\n{all_fields}",
"assignee_notification_disable_autoformat": "0",
"resend_assignee_emailEnable": "1",
"resend_assignee_emailValue": "7",
"resend_assignee_email_repeatEnable": "0",
"resend_assignee_email_repeatValue": "3",
"rejection_notification_enabled": "1",
"rejection_notification_type": "select",
"rejection_notification_users": [
"role|subscriber"
],
"rejection_notification_routing": [
{
"target": false,
"fieldId": "0",
"operator": "is",
"value": "",
"type": false,
"assignee": "user_id|1"
}
],
"rejection_notification_from_name": "Manager",
"rejection_notification_from_email": "{admin_email}",
"rejection_notification_reply_to": "",
"rejection_notification_bcc": "",
"rejection_notification_subject": "Entry rejected",
"rejection_notification_message": "Entry {entry_id} has been rejected",
"rejection_notification_disable_autoformat": "0",
"approval_notification_enabled": "1",
"approval_notification_type": "select",
"approval_notification_users": [
"role|subscriber"
],
"approval_notification_routing": [
{
"assignee": "user_id|10",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"approval_notification_from_name": "Manager",
"approval_notification_from_email": "{admin_email}",
"approval_notification_reply_to": "",
"approval_notification_bcc": "",
"approval_notification_subject": "Entry approved",
"approval_notification_message": "Entry {entry_id} has been approved",
"approval_notification_disable_autoformat": "0",
"revertEnable": "0",
"revertValue": "5",
"note_mode": "required_if_rejected",
"expiration": "0",
"expiration_type": "delay",
"expiration_date": "",
"expiration_delay_offset": "",
"expiration_delay_unit": "hours",
"expiration_date_field_offset": "0",
"expiration_date_field_offset_unit": "hours",
"expiration_date_field_before_after": "after",
"expiration_date_field": "3",
"status_expiration": "rejected",
"destination_expired": "next",
"destination_rejected": "5",
"destination_approved": "6"
},
"addon_slug": "gravityflow"
},
{
"id": "5",
"form_id": "5",
"is_active": "1",
"feed_order": "0",
"meta": {
"step_name": "Review dates",
"description": "",
"step_type": "user_input",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": [],
"scheduled": "0",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "",
"schedule_delay_unit": "hours",
"schedule_date_field_offset": "0",
"schedule_date_field_offset_unit": "hours",
"schedule_date_field_before_after": "after",
"schedule_date_field": "3",
"type": "select",
"assignees": [
"role|subscriber"
],
"editable_fields": [
"4"
],
"routing": "",
"highlight_editable_fields_enabled": "0",
"highlight_editable_fields_class": "green-triangle",
"assignee_policy": "all",
"instructionsEnable": "0",
"instructionsValue": "",
"display_fields_mode": "all_fields",
"default_status": "hidden",
"note_mode": "not_required",
"assignee_notification_enabled": "1",
"assignee_notification_from_name": "Manager",
"assignee_notification_from_email": "{admin_email}",
"assignee_notification_reply_to": "",
"assignee_notification_bcc": "",
"assignee_notification_subject": "",
"assignee_notification_message": "Please review the dates.\r\n\r\nNotes from manager:\r\n{workflow_note}",
"assignee_notification_disable_autoformat": "0",
"resend_assignee_emailEnable": "0",
"resend_assignee_emailValue": "7",
"expiration": "0",
"expiration_type": "delay",
"expiration_date": "",
"expiration_delay_offset": "",
"expiration_delay_unit": "hours",
"status_expiration": "complete",
"destination_expired": "next",
"destination_complete": 4
},
"addon_slug": "gravityflow"
},
{
"id": "6",
"form_id": "5",
"is_active": "1",
"feed_order": "0",
"meta": {
"step_name": "Vacation days approved",
"description": "",
"step_type": "notification",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": [],
"scheduled": "0",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "",
"schedule_delay_unit": "hours",
"schedule_date_field_offset": "0",
"schedule_date_field_offset_unit": "hours",
"schedule_date_field_before_after": "after",
"schedule_date_field": "3",
"notification_id_57b46011d910c": "0",
"workflow_notification_enabled": "1",
"workflow_notification_type": "select",
"workflow_notification_users": [
"role|subscriber"
],
"workflow_notification_routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"workflow_notification_from_name": "Manager",
"workflow_notification_from_email": "{admin_email}",
"workflow_notification_reply_to": "",
"workflow_notification_bcc": "",
"workflow_notification_subject": "",
"workflow_notification_message": "Your request have been approved.",
"workflow_notification_disable_autoformat": "0",
"destination_complete": "complete"
},
"addon_slug": "gravityflow"
}
]
}
},
"version": "2.2.5.5"
}

View File

@@ -0,0 +1,752 @@
{
"0": {
"title": "0019 User Input Highlight Editable Fields",
"description": "",
"labelPlacement": "top_label",
"descriptionPlacement": "below",
"button": {
"type": "text",
"text": "Submit",
"imageUrl": ""
},
"fields": [
{
"type": "html",
"id": 11,
"label": "HTML Block",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"displayOnly": true,
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"inputMask": false,
"inputMaskValue": "",
"allowsPrepopulate": false,
"content": "Entry Id: {entry_id}",
"formId": 8,
"description": "",
"inputType": "",
"cssClass": "",
"inputName": "",
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"visibility": "visible"
},
{
"type": "section",
"id": 12,
"label": "Section Break",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"displayOnly": true,
"formId": 8,
"description": "description",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"productField": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false,
"visibility": "visible"
},
{
"type": "text",
"id": 1,
"label": "Single Line",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": 8,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"displayOnly": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"maxLength": "100",
"visibility": "administrative",
"enablePrice": ""
},
{
"type": "number",
"id": 9,
"label": "Number",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"numberFormat": "decimal_dot",
"formId": 8,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": {
"actionType": "show",
"logicType": "all",
"rules": [
{
"fieldId": "1",
"operator": "is",
"value": ""
}
]
},
"enableCalculation": false,
"rangeMin": "",
"displayOnly": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"disableQuantity": false,
"displayAllCategories": false,
"visibility": "visible",
"enablePrice": "",
"rangeMax": ""
},
{
"type": "textarea",
"id": 2,
"label": "Paragraph",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": 8,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"displayOnly": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"visibility": "visible",
"enablePrice": ""
},
{
"type": "number",
"id": 10,
"label": "Calc",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"numberFormat": "decimal_dot",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "{Number:5} + {Number:9}",
"calculationRounding": "",
"enableCalculation": true,
"disableQuantity": false,
"displayAllCategories": false,
"inputMask": false,
"inputMaskValue": "",
"allowsPrepopulate": false,
"formId": 8,
"description": "",
"inputType": "",
"cssClass": "",
"inputName": "",
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"rangeMin": "",
"displayOnly": "",
"visibility": "visible",
"enablePrice": "",
"rangeMax": ""
},
{
"type": "email",
"id": 8,
"label": "Email",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": 8,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"displayOnly": "",
"visibility": "visible",
"enablePrice": ""
},
{
"type": "select",
"id": 3,
"label": "Dropdown",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"choices": [
{
"text": "First Choice",
"value": "First Choice",
"isSelected": false,
"price": ""
},
{
"text": "Second Choice",
"value": "Second Choice",
"isSelected": false,
"price": ""
},
{
"text": "Third Choice",
"value": "Third Choice",
"isSelected": false,
"price": ""
}
],
"formId": 8,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"noDuplicates": false,
"defaultValue": "",
"conditionalLogic": "",
"displayOnly": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"visibility": "visible",
"enablePrice": ""
},
{
"type": "multiselect",
"id": 4,
"label": "Multiselect",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"choices": [
{
"text": "First Choice",
"value": "First Choice",
"isSelected": false,
"price": ""
},
{
"text": "Second Choice",
"value": "Second Choice",
"isSelected": false,
"price": ""
},
{
"text": "Third Choice",
"value": "Third Choice",
"isSelected": false,
"price": ""
}
],
"formId": 8,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"noDuplicates": false,
"defaultValue": "",
"conditionalLogic": "",
"enableEnhancedUI": false,
"displayOnly": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"visibility": "visible",
"enablePrice": "",
"storageType": ""
},
{
"type": "number",
"id": 5,
"label": "Number",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"numberFormat": "decimal_dot",
"formId": 8,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"enableCalculation": false,
"rangeMin": "",
"displayOnly": "",
"visibility": "visible",
"enablePrice": "",
"rangeMax": ""
},
{
"type": "checkbox",
"id": 6,
"label": "Checkboxes",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"choices": [
{
"text": "First Choice",
"value": "First Choice",
"isSelected": false,
"price": ""
},
{
"text": "Second Choice",
"value": "Second Choice",
"isSelected": false,
"price": ""
},
{
"text": "Third Choice",
"value": "Third Choice",
"isSelected": false,
"price": ""
}
],
"inputs": [
{
"id": "6.1",
"label": "First Choice",
"name": ""
},
{
"id": "6.2",
"label": "Second Choice",
"name": ""
},
{
"id": "6.3",
"label": "Third Choice",
"name": ""
}
],
"formId": 8,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"noDuplicates": false,
"defaultValue": "",
"conditionalLogic": "",
"displayOnly": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"visibility": "visible",
"enablePrice": ""
},
{
"type": "radio",
"id": 7,
"label": "Radio",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"choices": [
{
"text": "First Choice",
"value": "First Choice",
"isSelected": false,
"price": ""
},
{
"text": "Second Choice",
"value": "Second Choice",
"isSelected": false,
"price": ""
},
{
"text": "Third Choice",
"value": "Third Choice",
"isSelected": false,
"price": ""
}
],
"formId": 8,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"noDuplicates": false,
"defaultValue": "",
"conditionalLogic": "",
"displayOnly": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false,
"visibility": "visible",
"enablePrice": ""
},
{
"type": "radio",
"id": 13,
"label": "Admin only radio required",
"adminLabel": "",
"isRequired": true,
"size": "medium",
"errorMessage": "",
"inputs": null,
"choices": [
{
"text": "First Choice",
"value": "First Choice",
"isSelected": false,
"price": ""
},
{
"text": "Second Choice",
"value": "Second Choice",
"isSelected": false,
"price": ""
},
{
"text": "Third Choice",
"value": "Third Choice",
"isSelected": false,
"price": ""
}
],
"formId": 8,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"noDuplicates": false,
"defaultValue": "",
"conditionalLogic": "",
"productField": "",
"enableOtherChoice": "",
"enablePrice": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false,
"visibility": "administrative",
"displayOnly": ""
}
],
"version": "2.2.5.5",
"id": 8,
"useCurrentUserAsAuthor": true,
"postContentTemplateEnabled": false,
"postTitleTemplateEnabled": false,
"postTitleTemplate": "",
"postContentTemplate": "",
"lastPageButton": null,
"pagination": null,
"firstPageCssClass": null,
"is_active": "1",
"date_created": "2017-11-24 11:42:49",
"is_trash": "0",
"confirmations": [
{
"id": "5660212ec90cb",
"name": "Default Confirmation",
"isDefault": true,
"type": "message",
"message": "Thanks for contacting us! We will get in touch with you shortly.",
"url": "",
"pageId": "",
"queryString": ""
}
],
"notifications": [
{
"id": "5660212ec8bee",
"to": "{admin_email}",
"name": "Admin Notification",
"event": "form_submission",
"toType": "email",
"subject": "New submission from {form_title}",
"message": "{all_fields}",
"isActive": false
}
],
"feeds": {
"gravityflow": [
{
"id": "14",
"form_id": "8",
"is_active": "1",
"feed_order": "0",
"meta": {
"step_name": "User Input",
"description": "Send to the admin user to enter values for the Paragraph field and the Dropdown field.",
"step_type": "user_input",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": [],
"scheduled": "0",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "",
"schedule_delay_unit": "hours",
"schedule_date_field_offset": "0",
"schedule_date_field_offset_unit": "hours",
"schedule_date_field_before_after": "after",
"type": "select",
"assignees": [
"user_id|1"
],
"editable_fields": [
"2",
"3",
"13"
],
"routing": "",
"assignee_policy": "all",
"conditional_logic_editable_fields_enabled": "0",
"highlight_editable_fields_enabled": "1",
"highlight_editable_fields_class": "green-background",
"instructionsEnable": "0",
"instructionsValue": "",
"display_fields_mode": "all_fields",
"default_status": "in_progress",
"note_mode": "not_required",
"assignee_notification_enabled": "0",
"assignee_notification_from_name": "",
"assignee_notification_from_email": "{admin_email}",
"assignee_notification_reply_to": "",
"assignee_notification_bcc": "",
"assignee_notification_subject": "",
"assignee_notification_message": "A new entry requires your input\r\n\r\n{workflow_entry_link: page_id=15 token=true}",
"assignee_notification_disable_autoformat": "0",
"resend_assignee_emailEnable": "0",
"resend_assignee_emailValue": "7",
"resend_assignee_email_repeatEnable": "0",
"resend_assignee_email_repeatValue": "3",
"in_progress_notification_enabled": "0",
"in_progress_notification_type": "select",
"in_progress_notification_routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"in_progress_notification_from_name": "",
"in_progress_notification_from_email": "{admin_email}",
"in_progress_notification_reply_to": "",
"in_progress_notification_bcc": "",
"in_progress_notification_subject": "",
"in_progress_notification_message": "Entry {entry_id} has been updated and remains in progress.",
"in_progress_notification_disable_autoformat": "0",
"complete_notification_enabled": "0",
"complete_notification_type": "select",
"complete_notification_routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"complete_notification_from_name": "",
"complete_notification_from_email": "{admin_email}",
"complete_notification_reply_to": "",
"complete_notification_bcc": "",
"complete_notification_subject": "",
"complete_notification_message": "Entry {entry_id} has been updated completing the step.",
"complete_notification_disable_autoformat": "0",
"confirmation_messageEnable": "0",
"confirmation_messageValue": "Thank you.",
"expiration": "0",
"expiration_type": "delay",
"expiration_date": "",
"expiration_delay_offset": "",
"expiration_delay_unit": "hours",
"expiration_date_field_offset": "0",
"expiration_date_field_offset_unit": "hours",
"expiration_date_field_before_after": "after",
"status_expiration": "complete",
"destination_expired": "next",
"destination_complete": "next"
},
"addon_slug": "gravityflow"
}
]
}
},
"version": "2.2.5.5"
}

View File

@@ -0,0 +1,505 @@
{
"0": {
"title": "Step Status Conditional Logic",
"description": "",
"labelPlacement": "top_label",
"descriptionPlacement": "below",
"button": {
"type": "text",
"text": "Submit",
"imageUrl": ""
},
"fields": [
{
"type": "text",
"id": 1,
"label": "Single Line",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": 11,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"visibility": "visible",
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"productField": "",
"enablePasswordInput": "",
"maxLength": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false
},
{
"type": "textarea",
"id": 2,
"label": "Paragraph",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": 11,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"visibility": "visible",
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"productField": "",
"form_id": "",
"useRichTextEditor": false,
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false
},
{
"type": "workflow_user",
"id": 3,
"label": "User",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"choices": [
{
"value": 1,
"text": "admin"
},
{
"value": 2,
"text": "test"
}
],
"formId": 11,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"visibility": "",
"noDuplicates": false,
"defaultValue": "",
"conditionalLogic": "",
"productField": "",
"gravityflowUsersRoleFilter": ""
}
],
"version": "2.3-dev-1",
"id": 11,
"useCurrentUserAsAuthor": true,
"postContentTemplateEnabled": false,
"postTitleTemplateEnabled": false,
"postTitleTemplate": "",
"postContentTemplate": "",
"lastPageButton": null,
"pagination": null,
"firstPageCssClass": null,
"is_active": "1",
"date_created": "2017-11-24 12:36:35",
"is_trash": "0",
"confirmations": [
{
"id": "59329f0092288",
"name": "Default Confirmation",
"isDefault": true,
"type": "message",
"message": "Thanks for contacting us! We will get in touch with you shortly.",
"url": "",
"pageId": "",
"queryString": ""
}
],
"notifications": [
{
"id": "59329f009139f",
"to": "{admin_email}",
"name": "Admin Notification",
"event": "form_submission",
"toType": "email",
"subject": "New submission from {form_title}",
"message": "{all_fields}"
}
],
"feeds": {
"gravityflow": [
{
"id": "26",
"form_id": "11",
"is_active": "1",
"feed_order": "0",
"meta": {
"step_name": "Approval Step",
"description": "",
"step_type": "approval",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": {
"conditionalLogic": {
"actionType": "show",
"logicType": "all",
"rules": [
{
"fieldId": "3",
"operator": "is",
"value": "1"
}
]
}
},
"scheduled": "0",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "",
"schedule_delay_unit": "hours",
"schedule_date_field_offset": "0",
"schedule_date_field_offset_unit": "hours",
"schedule_date_field_before_after": "after",
"type": "select",
"assignees": [
"user_id|1"
],
"routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"assignee_policy": "all",
"instructionsEnable": "0",
"instructionsValue": "Instructions: please review the values in the fields below and click on the Approve or Reject button",
"display_fields_mode": "all_fields",
"assignee_notification_enabled": "0",
"assignee_notification_from_name": "",
"assignee_notification_from_email": "{admin_email}",
"assignee_notification_reply_to": "",
"assignee_notification_bcc": "",
"assignee_notification_subject": "",
"assignee_notification_message": "A new entry is pending your approval. Please check your Workflow Inbox.",
"assignee_notification_disable_autoformat": "0",
"resend_assignee_emailEnable": "0",
"resend_assignee_emailValue": "7",
"resend_assignee_email_repeatEnable": "0",
"resend_assignee_email_repeatValue": "3",
"rejection_notification_enabled": "0",
"rejection_notification_type": "select",
"rejection_notification_routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"rejection_notification_from_name": "",
"rejection_notification_from_email": "{admin_email}",
"rejection_notification_reply_to": "",
"rejection_notification_bcc": "",
"rejection_notification_subject": "",
"rejection_notification_message": "Entry {entry_id} has been rejected",
"rejection_notification_disable_autoformat": "0",
"approval_notification_enabled": "0",
"approval_notification_type": "select",
"approval_notification_routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"approval_notification_from_name": "",
"approval_notification_from_email": "{admin_email}",
"approval_notification_reply_to": "",
"approval_notification_bcc": "",
"approval_notification_subject": "",
"approval_notification_message": "Entry {entry_id} has been approved",
"approval_notification_disable_autoformat": "0",
"note_mode": "not_required",
"expiration": "0",
"expiration_type": "delay",
"expiration_date": "",
"expiration_delay_offset": "",
"expiration_delay_unit": "hours",
"expiration_date_field_offset": "0",
"expiration_date_field_offset_unit": "hours",
"expiration_date_field_before_after": "after",
"status_expiration": "rejected",
"destination_expired": "next",
"destination_rejected": "next",
"destination_approved": "next"
},
"addon_slug": "gravityflow"
},
{
"id": "28",
"form_id": "11",
"is_active": "1",
"feed_order": "0",
"meta": {
"step_name": "Approval if Previous Approval Step Rejected",
"description": "",
"step_type": "approval",
"feed_condition_conditional_logic": "1",
"feed_condition_conditional_logic_object": {
"conditionalLogic": {
"actionType": "show",
"logicType": "all",
"rules": [
{
"fieldId": "workflow_step_status_26",
"operator": "is",
"value": "rejected"
}
]
}
},
"scheduled": "0",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "",
"schedule_delay_unit": "hours",
"schedule_date_field_offset": "0",
"schedule_date_field_offset_unit": "hours",
"schedule_date_field_before_after": "after",
"type": "select",
"assignees": [
"user_id|1"
],
"routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"assignee_policy": "all",
"instructionsEnable": "0",
"instructionsValue": "Instructions: please review the values in the fields below and click on the Approve or Reject button",
"display_fields_mode": "all_fields",
"assignee_notification_enabled": "0",
"assignee_notification_from_name": "",
"assignee_notification_from_email": "{admin_email}",
"assignee_notification_reply_to": "",
"assignee_notification_bcc": "",
"assignee_notification_subject": "",
"assignee_notification_message": "A new entry is pending your approval. Please check your Workflow Inbox.",
"assignee_notification_disable_autoformat": "0",
"resend_assignee_emailEnable": "0",
"resend_assignee_emailValue": "7",
"resend_assignee_email_repeatEnable": "0",
"resend_assignee_email_repeatValue": "3",
"rejection_notification_enabled": "0",
"rejection_notification_type": "select",
"rejection_notification_routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"rejection_notification_from_name": "",
"rejection_notification_from_email": "{admin_email}",
"rejection_notification_reply_to": "",
"rejection_notification_bcc": "",
"rejection_notification_subject": "",
"rejection_notification_message": "Entry {entry_id} has been rejected",
"rejection_notification_disable_autoformat": "0",
"approval_notification_enabled": "0",
"approval_notification_type": "select",
"approval_notification_routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"approval_notification_from_name": "",
"approval_notification_from_email": "{admin_email}",
"approval_notification_reply_to": "",
"approval_notification_bcc": "",
"approval_notification_subject": "",
"approval_notification_message": "Entry {entry_id} has been approved",
"approval_notification_disable_autoformat": "0",
"note_mode": "not_required",
"expiration": "0",
"expiration_type": "delay",
"expiration_date": "",
"expiration_delay_offset": "",
"expiration_delay_unit": "hours",
"expiration_date_field_offset": "0",
"expiration_date_field_offset_unit": "hours",
"expiration_date_field_before_after": "after",
"status_expiration": "rejected",
"destination_expired": "next",
"destination_rejected": "complete",
"destination_approved": "next"
},
"addon_slug": "gravityflow"
},
{
"id": "27",
"form_id": "11",
"is_active": "1",
"feed_order": "0",
"meta": {
"step_name": "Approval if Previous Approval Step Approved",
"description": "",
"step_type": "approval",
"feed_condition_conditional_logic": "1",
"feed_condition_conditional_logic_object": {
"conditionalLogic": {
"actionType": "show",
"logicType": "all",
"rules": [
{
"fieldId": "workflow_step_status_26",
"operator": "is",
"value": "approved"
}
]
}
},
"scheduled": "0",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "",
"schedule_delay_unit": "hours",
"schedule_date_field_offset": "0",
"schedule_date_field_offset_unit": "hours",
"schedule_date_field_before_after": "after",
"type": "select",
"assignees": [
"user_id|1"
],
"routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"assignee_policy": "all",
"instructionsEnable": "0",
"instructionsValue": "Instructions: please review the values in the fields below and click on the Approve or Reject button",
"display_fields_mode": "all_fields",
"assignee_notification_enabled": "0",
"assignee_notification_from_name": "",
"assignee_notification_from_email": "{admin_email}",
"assignee_notification_reply_to": "",
"assignee_notification_bcc": "",
"assignee_notification_subject": "",
"assignee_notification_message": "A new entry is pending your approval. Please check your Workflow Inbox.",
"assignee_notification_disable_autoformat": "0",
"resend_assignee_emailEnable": "0",
"resend_assignee_emailValue": "7",
"resend_assignee_email_repeatEnable": "0",
"resend_assignee_email_repeatValue": "3",
"rejection_notification_enabled": "0",
"rejection_notification_type": "select",
"rejection_notification_routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"rejection_notification_from_name": "",
"rejection_notification_from_email": "{admin_email}",
"rejection_notification_reply_to": "",
"rejection_notification_bcc": "",
"rejection_notification_subject": "",
"rejection_notification_message": "Entry {entry_id} has been rejected",
"rejection_notification_disable_autoformat": "0",
"approval_notification_enabled": "0",
"approval_notification_type": "select",
"approval_notification_routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"approval_notification_from_name": "",
"approval_notification_from_email": "{admin_email}",
"approval_notification_reply_to": "",
"approval_notification_bcc": "",
"approval_notification_subject": "",
"approval_notification_message": "Entry {entry_id} has been approved",
"approval_notification_disable_autoformat": "0",
"note_mode": "not_required",
"expiration": "0",
"expiration_type": "delay",
"expiration_date": "",
"expiration_delay_offset": "",
"expiration_delay_unit": "hours",
"expiration_date_field_offset": "0",
"expiration_date_field_offset_unit": "hours",
"expiration_date_field_before_after": "after",
"status_expiration": "rejected",
"destination_expired": "next",
"destination_rejected": "complete",
"destination_approved": "next"
},
"addon_slug": "gravityflow"
}
]
}
},
"version": "2.2.5.5"
}

View File

@@ -0,0 +1,408 @@
{
"0": {
"title": "0021 HS4878 User Input Section Logic",
"description": "",
"labelPlacement": "top_label",
"descriptionPlacement": "below",
"button": {
"type": "text",
"text": "Submit",
"imageUrl": ""
},
"fields": [
{
"type": "checkbox",
"id": 1,
"label": "Checkboxes",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"choices": [
{
"text": "First Choice",
"value": "First Choice",
"isSelected": false,
"price": ""
},
{
"text": "Second Choice",
"value": "Second Choice",
"isSelected": false,
"price": ""
}
],
"inputs": [
{
"id": "1.1",
"label": "First Choice",
"name": ""
},
{
"id": "1.2",
"label": "Second Choice",
"name": ""
}
],
"formId": 104,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"visibility": "visible",
"noDuplicates": false,
"defaultValue": "",
"conditionalLogic": "",
"productField": "",
"enablePrice": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false,
"displayOnly": ""
},
{
"type": "section",
"id": 2,
"label": "Hidden Section",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"displayOnly": true,
"formId": 104,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"visibility": "administrative",
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": {
"actionType": "show",
"logicType": "all",
"rules": [
{
"fieldId": "1",
"operator": "is",
"value": "First Choice"
}
]
},
"productField": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false
},
{
"type": "text",
"id": 3,
"label": "Text One",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": 104,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"visibility": "administrative",
"noDuplicates": false,
"defaultValue": "Value One",
"choices": "",
"conditionalLogic": "",
"productField": "",
"enablePasswordInput": "",
"maxLength": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false,
"displayOnly": "",
"enablePrice": ""
},
{
"type": "section",
"id": 4,
"label": "Visible Section",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"displayOnly": true,
"formId": 104,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"visibility": "administrative",
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": {
"actionType": "show",
"logicType": "all",
"rules": [
{
"fieldId": "1",
"operator": "is",
"value": "Second Choice"
}
]
},
"productField": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false
},
{
"type": "text",
"id": 5,
"label": "Text Two",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": 104,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"visibility": "administrative",
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"productField": "",
"enablePasswordInput": "",
"maxLength": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false,
"displayOnly": "",
"enablePrice": ""
}
],
"version": "2.2.5",
"id": 104,
"useCurrentUserAsAuthor": true,
"postContentTemplateEnabled": false,
"postTitleTemplateEnabled": false,
"postTitleTemplate": "",
"postContentTemplate": "",
"lastPageButton": null,
"pagination": null,
"firstPageCssClass": null,
"notifications": [],
"confirmations": [
{
"id": "5a196dfa28d79",
"name": "Default Confirmation",
"isDefault": true,
"type": "message",
"message": "Thanks for contacting us! We will get in touch with you shortly.",
"url": "",
"pageId": "",
"queryString": ""
}
],
"subLabelPlacement": "below",
"cssClass": "",
"enableHoneypot": false,
"enableAnimation": false,
"save": {
"enabled": false,
"button": {
"type": "link",
"text": "Save and Continue Later"
}
},
"limitEntries": false,
"limitEntriesCount": "",
"limitEntriesPeriod": "",
"limitEntriesMessage": "",
"scheduleForm": false,
"scheduleStart": "",
"scheduleStartHour": "",
"scheduleStartMinute": "",
"scheduleStartAmpm": "",
"scheduleEnd": "",
"scheduleEndHour": "",
"scheduleEndMinute": "",
"scheduleEndAmpm": "",
"schedulePendingMessage": "",
"scheduleMessage": "",
"requireLogin": false,
"requireLoginMessage": "",
"feeds": {
"gravityflow": [
{
"id": "337",
"form_id": "104",
"is_active": "1",
"feed_order": "0",
"meta": {
"step_name": "Test Section Conditional Logic",
"description": "",
"step_type": "user_input",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": [],
"scheduled": "0",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "",
"schedule_delay_unit": "hours",
"schedule_date_field_offset": "0",
"schedule_date_field_offset_unit": "hours",
"schedule_date_field_before_after": "after",
"type": "select",
"assignees": [
"user_id|1"
],
"editable_fields": [
"3",
"5"
],
"routing": "",
"assignee_policy": "all",
"conditional_logic_editable_fields_enabled": "1",
"highlight_editable_fields_enabled": "0",
"highlight_editable_fields_class": "green-triangle",
"instructionsEnable": "0",
"instructionsValue": "",
"display_fields_mode": "all_fields",
"default_status": "hidden",
"note_mode": "not_required",
"assignee_notification_enabled": "0",
"assignee_notification_from_name": "",
"assignee_notification_from_email": "{admin_email}",
"assignee_notification_reply_to": "",
"assignee_notification_bcc": "",
"assignee_notification_subject": "",
"assignee_notification_message": "A new entry requires your input.",
"assignee_notification_disable_autoformat": "0",
"resend_assignee_emailEnable": "0",
"resend_assignee_emailValue": "7",
"resend_assignee_email_repeatEnable": "0",
"resend_assignee_email_repeatValue": "3",
"in_progress_notification_enabled": "0",
"in_progress_notification_type": "select",
"in_progress_notification_routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"in_progress_notification_from_name": "",
"in_progress_notification_from_email": "{admin_email}",
"in_progress_notification_reply_to": "",
"in_progress_notification_bcc": "",
"in_progress_notification_subject": "",
"in_progress_notification_message": "Entry {entry_id} has been updated and remains in progress.",
"in_progress_notification_disable_autoformat": "0",
"complete_notification_enabled": "0",
"complete_notification_type": "select",
"complete_notification_routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"complete_notification_from_name": "",
"complete_notification_from_email": "{admin_email}",
"complete_notification_reply_to": "",
"complete_notification_bcc": "",
"complete_notification_subject": "",
"complete_notification_message": "Entry {entry_id} has been updated completing the step.",
"complete_notification_disable_autoformat": "0",
"confirmation_messageEnable": "0",
"confirmation_messageValue": "Thank you.",
"expiration": "0",
"expiration_type": "delay",
"expiration_date": "",
"expiration_delay_offset": "",
"expiration_delay_unit": "hours",
"expiration_date_field_offset": "0",
"expiration_date_field_offset_unit": "hours",
"expiration_date_field_before_after": "after",
"status_expiration": "complete",
"destination_expired": "next",
"destination_complete": "next"
},
"addon_slug": "gravityflow"
}
]
}
},
"version": "2.2.5"
}

View File

@@ -0,0 +1,426 @@
{
"0": {
"title": "0022 Send To Step",
"description": "",
"labelPlacement": "top_label",
"descriptionPlacement": "below",
"button": {
"type": "text",
"text": "Submit",
"imageUrl": ""
},
"fields": [
{
"type": "text",
"id": 1,
"label": "Text Field",
"adminLabel": "",
"isRequired": true,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": 16,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"visibility": "visible",
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"productField": "",
"enablePasswordInput": "",
"maxLength": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false,
"displayOnly": "",
"enablePrice": ""
},
{
"type": "email",
"id": 4,
"label": "Email Field",
"adminLabel": "",
"isRequired": true,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": 16,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"visibility": "visible",
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"productField": "",
"emailConfirmEnabled": "",
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"useRichTextEditor": false,
"displayOnly": "",
"enablePrice": ""
},
{
"type": "textarea",
"id": 3,
"label": "Paragraph Field",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": 16,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"visibility": "visible",
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"productField": "",
"form_id": "",
"useRichTextEditor": false,
"multipleFiles": false,
"maxFiles": "",
"calculationFormula": "",
"calculationRounding": "",
"enableCalculation": "",
"disableQuantity": false,
"displayAllCategories": false,
"displayOnly": "",
"enablePrice": ""
}
],
"version": "2.2.5.5",
"id": 16,
"useCurrentUserAsAuthor": true,
"postContentTemplateEnabled": false,
"postTitleTemplateEnabled": false,
"postTitleTemplate": "",
"postContentTemplate": "",
"lastPageButton": null,
"pagination": null,
"firstPageCssClass": null,
"confirmations": [
{
"id": "5a2a4e06710ba",
"name": "Default Confirmation",
"isDefault": true,
"type": "message",
"message": "Thanks for contacting us! We will get in touch with you shortly.",
"url": "",
"pageId": "",
"queryString": ""
}
],
"notifications": [
{
"id": "5a2a4e0670e0f",
"to": "{admin_email}",
"name": "Admin Notification",
"event": "form_submission",
"toType": "email",
"subject": "New submission from {form_title}",
"message": "{all_fields}"
}
],
"feeds": {
"gravityflow": [
{
"id": "41",
"form_id": "16",
"is_active": "1",
"feed_order": "0",
"meta": {
"step_name": "Approval Step",
"description": "",
"step_type": "approval",
"step_highlight": "0",
"step_highlight_type": "color",
"step_highlight_color": "#dd3333",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": [],
"scheduled": "0",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "",
"schedule_delay_unit": "hours",
"schedule_date_field_offset": "0",
"schedule_date_field_offset_unit": "hours",
"schedule_date_field_before_after": "after",
"type": "select",
"assignees": [
"role|administrator"
],
"routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"assignee_policy": "all",
"instructionsEnable": "0",
"instructionsValue": "Instructions: please review the values in the fields below and click on the Approve or Reject button",
"display_fields_mode": "all_fields",
"assignee_notification_enabled": "0",
"assignee_notification_from_name": "",
"assignee_notification_from_email": "{admin_email}",
"assignee_notification_reply_to": "",
"assignee_notification_bcc": "",
"assignee_notification_subject": "",
"assignee_notification_message": "A new entry is pending your approval. Please check your Workflow Inbox.",
"assignee_notification_disable_autoformat": "0",
"resend_assignee_emailEnable": "0",
"resend_assignee_emailValue": "7",
"resend_assignee_email_repeatEnable": "0",
"resend_assignee_email_repeatValue": "3",
"rejection_notification_enabled": "0",
"rejection_notification_type": "select",
"rejection_notification_routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"rejection_notification_from_name": "",
"rejection_notification_from_email": "{admin_email}",
"rejection_notification_reply_to": "",
"rejection_notification_bcc": "",
"rejection_notification_subject": "",
"rejection_notification_message": "Entry {entry_id} has been rejected",
"rejection_notification_disable_autoformat": "0",
"approval_notification_enabled": "0",
"approval_notification_type": "select",
"approval_notification_routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"approval_notification_from_name": "",
"approval_notification_from_email": "{admin_email}",
"approval_notification_reply_to": "",
"approval_notification_bcc": "",
"approval_notification_subject": "",
"approval_notification_message": "Entry {entry_id} has been approved",
"approval_notification_disable_autoformat": "0",
"note_mode": "not_required",
"expiration": "0",
"expiration_type": "delay",
"expiration_date": "",
"expiration_delay_offset": "",
"expiration_delay_unit": "hours",
"expiration_date_field_offset": "0",
"expiration_date_field_offset_unit": "hours",
"expiration_date_field_before_after": "after",
"status_expiration": "rejected",
"destination_expired": "next",
"destination_rejected": "complete",
"destination_approved": "next"
},
"addon_slug": "gravityflow"
},
{
"id": "42",
"form_id": "16",
"is_active": "1",
"feed_order": "0",
"meta": {
"step_name": "Notification Step",
"description": "",
"step_type": "notification",
"step_highlight": "0",
"step_highlight_type": "color",
"step_highlight_color": "#dd3333",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": [],
"scheduled": "0",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "",
"schedule_delay_unit": "hours",
"schedule_date_field_offset": "0",
"schedule_date_field_offset_unit": "hours",
"schedule_date_field_before_after": "after",
"notification_id_5a2a4e0670e0f": "0",
"workflow_notification_enabled": "1",
"workflow_notification_type": "select",
"workflow_notification_users": [
"role|administrator"
],
"workflow_notification_routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"workflow_notification_from_name": "",
"workflow_notification_from_email": "{admin_email}",
"workflow_notification_reply_to": "",
"workflow_notification_bcc": "",
"workflow_notification_subject": "",
"workflow_notification_message": "",
"workflow_notification_disable_autoformat": "0",
"destination_complete": "next"
},
"addon_slug": "gravityflow"
},
{
"id": "43",
"form_id": "16",
"is_active": "1",
"feed_order": "0",
"meta": {
"step_name": "User Input",
"description": "",
"step_type": "user_input",
"step_highlight": "0",
"step_highlight_type": "color",
"step_highlight_color": "#dd3333",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": [],
"scheduled": "0",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "",
"schedule_delay_unit": "hours",
"schedule_date_field_offset": "0",
"schedule_date_field_offset_unit": "hours",
"schedule_date_field_before_after": "after",
"type": "select",
"assignees": [
"user_id|1",
"email_field|4"
],
"editable_fields": [
"1",
"3"
],
"routing": "",
"assignee_policy": "any",
"highlight_editable_fields_enabled": "0",
"highlight_editable_fields_class": "green-triangle",
"instructionsEnable": "0",
"instructionsValue": "",
"display_fields_mode": "all_fields",
"default_status": "hidden",
"note_mode": "not_required",
"assignee_notification_enabled": "1",
"assignee_notification_from_name": "",
"assignee_notification_from_email": "{admin_email}",
"assignee_notification_reply_to": "",
"assignee_notification_bcc": "",
"assignee_notification_subject": "",
"assignee_notification_message": "A new entry requires your input.",
"assignee_notification_disable_autoformat": "0",
"resend_assignee_emailEnable": "0",
"resend_assignee_emailValue": "7",
"resend_assignee_email_repeatEnable": "0",
"resend_assignee_email_repeatValue": "3",
"in_progress_notification_enabled": "0",
"in_progress_notification_type": "select",
"in_progress_notification_routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"in_progress_notification_from_name": "",
"in_progress_notification_from_email": "{admin_email}",
"in_progress_notification_reply_to": "",
"in_progress_notification_bcc": "",
"in_progress_notification_subject": "",
"in_progress_notification_message": "Entry {entry_id} has been updated and remains in progress.",
"in_progress_notification_disable_autoformat": "0",
"complete_notification_enabled": "0",
"complete_notification_type": "select",
"complete_notification_routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"complete_notification_from_name": "",
"complete_notification_from_email": "{admin_email}",
"complete_notification_reply_to": "",
"complete_notification_bcc": "",
"complete_notification_subject": "",
"complete_notification_message": "Entry {entry_id} has been updated completing the step.",
"complete_notification_disable_autoformat": "0",
"confirmation_messageEnable": "0",
"confirmation_messageValue": "Thank you.",
"expiration": "0",
"expiration_type": "delay",
"expiration_date": "",
"expiration_delay_offset": "",
"expiration_delay_unit": "hours",
"expiration_date_field_offset": "0",
"expiration_date_field_offset_unit": "hours",
"expiration_date_field_before_after": "after",
"status_expiration": "complete",
"destination_expired": "next",
"destination_complete": "next"
},
"addon_slug": "gravityflow"
}
]
}
},
"version": "2.2.5.5"
}

View File

@@ -0,0 +1,364 @@
{
"0": {
"title": "0026 Role Assignee Token",
"description": "",
"labelPlacement": "top_label",
"descriptionPlacement": "below",
"button": {
"type": "text",
"text": "Submit",
"imageUrl": ""
},
"fields": [
{
"type": "text",
"id": 1,
"label": "Single Line Text",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": 59,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"visibility": "",
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"productField": "",
"enablePasswordInput": "",
"maxLength": "",
"displayOnly": "",
"enablePrice": ""
},
{
"type": "textarea",
"id": 2,
"label": "Paragraph",
"adminLabel": "",
"isRequired": false,
"size": "medium",
"errorMessage": "",
"inputs": null,
"formId": 59,
"description": "",
"allowsPrepopulate": false,
"inputMask": false,
"inputMaskValue": "",
"inputType": "",
"labelPlacement": "",
"descriptionPlacement": "",
"subLabelPlacement": "",
"placeholder": "",
"cssClass": "",
"inputName": "",
"visibility": "",
"noDuplicates": false,
"defaultValue": "",
"choices": "",
"conditionalLogic": "",
"productField": "",
"form_id": "",
"useRichTextEditor": "",
"displayOnly": "",
"enablePrice": ""
}
],
"version": "2.3.2.1",
"id": 59,
"useCurrentUserAsAuthor": true,
"postContentTemplateEnabled": false,
"postTitleTemplateEnabled": false,
"postTitleTemplate": "",
"postContentTemplate": "",
"lastPageButton": null,
"pagination": null,
"firstPageCssClass": null,
"notifications": [
{
"id": "5a91d6c90aa52",
"to": "{admin_email}",
"name": "Admin Notification",
"event": "form_submission",
"toType": "email",
"subject": "New submission from {form_title}",
"message": "{all_fields}"
}
],
"confirmations": [
{
"id": "5a91d6c90b2c2",
"name": "Default Confirmation",
"isDefault": true,
"type": "message",
"message": "Thanks for contacting us! We will get in touch with you shortly.",
"url": "",
"pageId": "",
"queryString": ""
}
],
"subLabelPlacement": "below",
"cssClass": "",
"enableHoneypot": false,
"enableAnimation": false,
"save": {
"enabled": false,
"button": {
"type": "link",
"text": "Save and Continue Later"
}
},
"limitEntries": false,
"limitEntriesCount": "",
"limitEntriesPeriod": "",
"limitEntriesMessage": "",
"scheduleForm": false,
"scheduleStart": "",
"scheduleStartHour": "",
"scheduleStartMinute": "",
"scheduleStartAmpm": "",
"scheduleEnd": "",
"scheduleEndHour": "",
"scheduleEndMinute": "",
"scheduleEndAmpm": "",
"schedulePendingMessage": "",
"scheduleMessage": "",
"requireLogin": false,
"requireLoginMessage": "",
"feeds": {
"gravityflow": [
{
"id": "202",
"form_id": "59",
"is_active": "1",
"feed_order": "0",
"meta": {
"step_name": "Approval",
"description": "",
"step_type": "approval",
"step_highlight": "0",
"step_highlight_type": "color",
"step_highlight_color": "#dd3333",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": [],
"scheduled": "0",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "",
"schedule_delay_unit": "hours",
"schedule_date_field_offset": "0",
"schedule_date_field_offset_unit": "hours",
"schedule_date_field_before_after": "after",
"type": "select",
"assignees": [
"role|administrator"
],
"routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"assignee_policy": "all",
"instructionsEnable": "0",
"instructionsValue": "Instructions: please review the values in the fields below and click on the Approve or Reject button",
"display_fields_mode": "all_fields",
"assignee_notification_enabled": "1",
"assignee_notification_from_name": "",
"assignee_notification_from_email": "{admin_email}",
"assignee_notification_reply_to": "",
"assignee_notification_bcc": "",
"assignee_notification_subject": "0026 Email - Role Assignee - Token - Approval",
"assignee_notification_message": "A new entry is pending your approval. Please check your Workflow Inbox.\r\n{workflow_entry_link: token=\"true\" text=\"Open Workflow Entry Detail\"}",
"assignee_notification_disable_autoformat": "0",
"resend_assignee_emailEnable": "0",
"resend_assignee_emailValue": "7",
"resend_assignee_email_repeatEnable": "0",
"resend_assignee_email_repeatValue": "3",
"rejection_notification_enabled": "0",
"rejection_notification_type": "select",
"rejection_notification_users": [
"role|administrator"
],
"rejection_notification_routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"rejection_notification_from_name": "",
"rejection_notification_from_email": "{admin_email}",
"rejection_notification_reply_to": "",
"rejection_notification_bcc": "",
"rejection_notification_subject": "",
"rejection_notification_message": "Entry {entry_id} has been rejected",
"rejection_notification_disable_autoformat": "0",
"approval_notification_enabled": "0",
"approval_notification_type": "select",
"approval_notification_users": [
"role|administrator"
],
"approval_notification_routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"approval_notification_from_name": "",
"approval_notification_from_email": "{admin_email}",
"approval_notification_reply_to": "",
"approval_notification_bcc": "",
"approval_notification_subject": "",
"approval_notification_message": "Entry {entry_id} has been approved",
"approval_notification_disable_autoformat": "0",
"revertEnable": "0",
"revertValue": "203",
"note_mode": "not_required",
"expiration": "0",
"expiration_type": "delay",
"expiration_date": "",
"expiration_delay_offset": "",
"expiration_delay_unit": "hours",
"expiration_date_field_offset": "0",
"expiration_date_field_offset_unit": "hours",
"expiration_date_field_before_after": "after",
"status_expiration": "rejected",
"destination_expired": "next",
"destination_rejected": "complete",
"destination_approved": "next"
},
"addon_slug": "gravityflow",
"event_type": null
},
{
"id": "203",
"form_id": "59",
"is_active": "1",
"feed_order": "0",
"meta": {
"step_name": "User Input",
"description": "",
"step_type": "user_input",
"step_highlight": "0",
"step_highlight_type": "color",
"step_highlight_color": "#dd3333",
"feed_condition_conditional_logic": "0",
"feed_condition_conditional_logic_object": [],
"scheduled": "0",
"schedule_type": "delay",
"schedule_date": "",
"schedule_delay_offset": "",
"schedule_delay_unit": "hours",
"schedule_date_field_offset": "0",
"schedule_date_field_offset_unit": "hours",
"schedule_date_field_before_after": "after",
"type": "select",
"assignees": [
"role|administrator"
],
"editable_fields": [
"1",
"2"
],
"routing": "",
"assignee_policy": "all",
"highlight_editable_fields_enabled": "0",
"highlight_editable_fields_class": "green-triangle",
"instructionsEnable": "0",
"instructionsValue": "",
"display_fields_mode": "all_fields",
"default_status": "hidden",
"note_mode": "not_required",
"assignee_notification_enabled": "1",
"assignee_notification_from_name": "",
"assignee_notification_from_email": "{admin_email}",
"assignee_notification_reply_to": "",
"assignee_notification_bcc": "",
"assignee_notification_subject": "0026 Email - Role Assignee - Token - User Input",
"assignee_notification_message": "A new entry requires your input.\r\n{workflow_entry_link: token=\"true\" text=\"Open Workflow Entry Detail\"}",
"assignee_notification_disable_autoformat": "0",
"resend_assignee_emailEnable": "0",
"resend_assignee_emailValue": "7",
"resend_assignee_email_repeatEnable": "0",
"resend_assignee_email_repeatValue": "3",
"in_progress_notification_enabled": "0",
"in_progress_notification_type": "select",
"in_progress_notification_routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"in_progress_notification_from_name": "",
"in_progress_notification_from_email": "{admin_email}",
"in_progress_notification_reply_to": "",
"in_progress_notification_bcc": "",
"in_progress_notification_subject": "",
"in_progress_notification_message": "Entry {entry_id} has been updated and remains in progress.",
"in_progress_notification_disable_autoformat": "0",
"complete_notification_enabled": "0",
"complete_notification_type": "select",
"complete_notification_users": [
"role|administrator"
],
"complete_notification_routing": [
{
"assignee": "user_id|1",
"fieldId": "0",
"operator": "is",
"value": "",
"type": ""
}
],
"complete_notification_from_name": "",
"complete_notification_from_email": "{admin_email}",
"complete_notification_reply_to": "",
"complete_notification_bcc": "",
"complete_notification_subject": "",
"complete_notification_message": "Entry {entry_id} has been updated completing the step.",
"complete_notification_disable_autoformat": "0",
"confirmation_messageEnable": "0",
"confirmation_messageValue": "Thank you.",
"expiration": "0",
"expiration_type": "delay",
"expiration_date": "",
"expiration_delay_offset": "",
"expiration_delay_unit": "hours",
"expiration_date_field_offset": "0",
"expiration_date_field_offset_unit": "hours",
"expiration_date_field_before_after": "after",
"status_expiration": "complete",
"destination_expired": "next",
"destination_complete": "next"
},
"addon_slug": "gravityflow",
"event_type": null
}
]
}
},
"version": "2.3.2.1"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

@@ -0,0 +1,24 @@
<?php
/**
Plugin Name: Email Logger
Plugin URI: https://gravityflow.io
Description: Creates a post for each notification sent.
Version: 1.0
Author: Gravity Flow
Author URI: https://gravityflow.io
License: GPL-2.0+
*/
add_action( 'gform_after_email', 'sh_gform_after_email', 10, 13 );
function sh_gform_after_email( $is_success, $to, $subject, $message, $headers, $attachments, $message_format, $from, $from_name, $bcc, $reply_to, $entry, $cc ) {
$page = array(
'post_type' => 'post',
'post_content' => $message,
'post_name' => sanitize_title_with_dashes( $subject ),
'post_parent' => 0,
'post_author' => 1,
'post_status' => 'publish',
'post_title' => $subject,
);
wp_insert_post( $page );
}

View File

@@ -0,0 +1,46 @@
<?php
/**
* Inherited Methods
* @method void wantToTest( $text )
* @method void wantTo( $text )
* @method void execute( $callable )
* @method void expectTo( $prediction )
* @method void expect( $prediction )
* @method void amGoingTo( $argumentation )
* @method void am( $role )
* @method void lookForwardTo( $achieveValue )
* @method void comment( $description )
* @method \Codeception\Lib\Friend haveFriend( $name, $actorClass = null )
*
* @SuppressWarnings(PHPMD)
*/
class AcceptanceTester extends \Codeception\Actor {
use _generated\AcceptanceTesterActions;
/**
* Define custom actions here
*/
public function logOut() {
$I = $this;
$I->amOnPage( '/wp-login.php?action=logout' );
$I->click( 'log out' );
$I->wait( 1 );
}
/**
* Navigate to the specified Workflow page in the admin.
*
* @param string $page The page to visit e.g. Inbox or Status
*/
public function amOnWorkflowPage( $page ) {
$I = $this;
$I->amOnPage( '/wp-admin' );
$I->click( 'Workflow' );
$I->waitForText( $page, 3 );
$I->click( $page );
$I->waitForText( "Workflow $page", 3 );
}
}

View File

@@ -0,0 +1,10 @@
<?php
namespace Helper;
// here you can define custom actions
// all public methods declared in helper class will be available in $I
class Acceptance extends \Codeception\Module
{
}

View File

@@ -0,0 +1,10 @@
<?php
namespace Helper;
// here you can define custom actions
// all public methods declared in helper class will be available in $I
class Functional extends \Codeception\Module
{
}

View File

@@ -0,0 +1,10 @@
<?php
namespace Helper;
// here you can define custom actions
// all public methods declared in helper class will be available in $I
class Integration extends \Codeception\Module
{
}

View File

@@ -0,0 +1,10 @@
<?php
namespace Helper;
// here you can define custom actions
// all public methods declared in helper class will be available in $I
class Unit extends \Codeception\Module
{
}

View File

@@ -0,0 +1,13 @@
# Codeception Test Suite Configuration
# Suite for WordPress acceptance tests.
# Perform tests using or simulating a browser.
class_name: AcceptanceTester
modules:
enabled:
- \Helper\Acceptance
- WPLoader
- WPWebDriver

View File

@@ -0,0 +1,37 @@
<?php
/*
* Purpose: Test the field conditional logic and the numeric input validation
*/
$I = new AcceptanceTester( $scenario );
$I->wantTo( 'Test the field conditional logic and the numeric input validation' );
// Submit the form
$I->amOnPage( '/0001-conditional-field' );
$I->see( 'Conditional Field' );
$I->scrollTo( [ 'css' => '.gform_title' ] ); // needed for chromedriver
$I->selectOption( 'input[name=input_1]', 'Second Choice' );
$I->seeElement('select[name="input_3"]');
$I->selectOption( 'select[name=input_3]', 'Second Choice' );
$I->seeElement('input[name="input_4"]');
$I->fillField( 'input[name=input_4]', '123NAN' );
$I->scrollTo( [ 'css' => 'input[type=submit]' ] ); // needed for chromedriver
$I->click( 'Submit' );
// trow number field error
$I->waitForElement( 'div.validation_error', 3 );
// fill number field with correct values
$I->fillField( 'input[name=input_4]', '1234' );
$I->click( 'Submit' );
$I->waitForText( 'Thanks for contacting us! We will get in touch with you shortly.', 3 );
// Login to wp-admin
$I->loginAsAdmin();
// Go to Status
$I->amOnWorkflowPage( 'Status' );
$I->click( 'Conditional Field' );
$I->waitForText( 'Status: Complete', 3 );

View File

@@ -0,0 +1,45 @@
<?php
/*
* Purpose: Test the field conditional logic on the user input step
*/
$I = new AcceptanceTester( $scenario );
$I->wantTo( 'Test the field conditional logic on the user input step' );
// Submit the form
$I->amOnPage( '/0002-conditional-logic' );
$I->see( 'Conditional Logic' );
$I->scrollTo( [ 'css' => '.gform_title' ], 20, 50 ); // needed for chromedriver
$I->selectOption( 'input[name=input_7]', 'Second Choice' );
$I->dontSeeElement( 'textarea[name=input_15]' );
$I->checkOption( 'input[name=input_13\\.1]' );
$I->seeElement( 'textarea[name=input_15]' );
$I->fillField( 'textarea[name=input_15]', 'Some text' );
$I->scrollTo( [ 'css' => '.gform_page_footer .gform_next_button' ], 20, 50 ); // needed for chromedriver
// Next page
$I->click( '.gform_page_footer .gform_next_button' );
$I->click( 'input[type=submit]' );
$I->waitForText( 'Thanks for contacting us!', 3 );
// Login to wp-admin
$I->loginAsAdmin();
$I->seeInCurrentUrl( '/wp-admin/' );
// Go to Inbox
$I->amOnWorkflowPage( 'Inbox' );
$I->click( 'Conditional Logic' );
// Approve
$I->waitForElement( 'button[value=approved]', 3 );
$I->click( 'button[value=approved]' );
// Check field conditional logic on the user input step
$I->waitForText( 'Some text', 3 );
$I->see( 'Second Section - Second Choice' );
$I->seeElement( 'textarea[name=input_15]' );
$I->uncheckOption( 'input[name=input_13\\.1]' );
$I->dontSeeElement( 'textarea[name=input_15]' );

View File

@@ -0,0 +1,39 @@
<?php
/*
* Purpose: Test assignee routing based on the value of a checkbox field
*/
$I = new AcceptanceTester( $scenario );
$I->wantTo( 'Test assignee routing based on the value of a checkbox field' );
// Submit the form
$I->amOnPage( '/0003-dynamic-assignee-routing' );
$I->scrollTo( [ 'css' => '.gform_title' ] );
$I->fillField( 'Single Line', 'Some Text' );
$I->fillField( 'Paragraph', 'Some Text' );
$I->checkOption( 'Publisher 1' );
$I->checkOption( 'Publisher 3' );
$I->scrollTo( [ 'css' => 'input[type=submit]' ] );
$I->click( 'Submit' );
$I->loginAsAdmin();
$I->amOnWorkflowPage( 'Inbox' );
$I->click( 'Dynamic Assignee Routing' );
$I->waitForText( 'User: admin1 admin1 (Pending)', 3 );
$I->see( 'User: admin3 admin3 (Pending)' );
$I->dontSee( 'User: admin2 admin2 (Pending)' );
// Add admin2 to the assignees (configured in the step conditional routing)
$I->checkOption( 'Publisher 2' );
$I->click( 'Update' );
$I->waitForText( 'User: admin1 admin1 (Pending)', 3 );
$I->see( 'User: admin2 admin2 (Pending)' );
$I->see( 'User: admin3 admin3 (Pending)' );

View File

@@ -0,0 +1,54 @@
<?php
/*
* Purpose: Test dynamically pre populate fields
*/
$I = new AcceptanceTester( $scenario );
$I->wantTo( 'Test dynamically pre populate fields' );
// Submit the form
$I->amOnPage( '/0004-dynamically-pre-populate-fields/?quant=10&prodname=Test product&prodprice=25' );
$I->waitForText( 'Dynamically Pre Populate Fields', 3 );
$I->scrollTo( [ 'css' => '.gform_title' ], 20, 50 ); // needed for chromedriver
$I->selectOption( 'input[name="input_3.1"]', 'First Option' );
$I->selectOption( 'input[name="input_3.2"]', 'Second Option' );
$I->see( '$320.00' );
$I->scrollTo( [ 'css' => 'input[type=submit]' ], 20, 50 ); // needed for chromedriver
// Next page
$I->click( '.gform_page_footer .gform_next_button' );
$I->fillField( 'textarea[name="input_6"]', 'Discussion text field.' );
$I->selectOption( 'select[name=input_8]', 'admin2 admin2' );
$I->click( 'Submit' );
$I->waitForText( 'Thanks for contacting us! We will get in touch with you shortly.', 3 );
// Login as admin2
$I->loginAs( 'admin2', 'admin2' );
$I->seeInCurrentUrl( '/wp-admin/' );
// Go to Inbox
$I->amOnWorkflowPage( 'Inbox' );
$I->click( 'Dynamically Pre Populate Fields' );
$I->fillField( 'input[name="input_2"]', '11' );
$I->fillField( 'textarea[name="gravityflow_note"]', 'Quantity updated!' );
$I->click( 'Submit' );
// Log out
$I->logOut();
// Login as Admin
$I->loginAsAdmin();
$I->seeInCurrentUrl( '/wp-admin/' );
// Go to Inbox
$I->amOnWorkflowPage( 'Inbox' );
$I->click( 'Dynamically Pre Populate Fields' );
// Approve
$I->fillField( 'textarea[name="gravityflow_note"]', 'Order approved' );
$I->seeElement( 'button[value=approved]' );
$I->click( 'button[value=approved]' );
$I->waitForText( 'Status: Approved', 3 );

View File

@@ -0,0 +1,35 @@
<?php
/*
* Purpose: Test the file upload field in the user input step
*/
$I = new AcceptanceTester( $scenario );
$I->wantTo( 'Test the file upload field in the user input step' );
// Submit the form
$I->amOnPage( '/0005-file-upload-user-input' );
$I->see( 'File Upload User Input' );
$I->scrollTo( [ 'css' => '.gform_title' ], 20, 50 ); // needed for chromedriver
$I->fillField( 'Single Line Text', 'testing' );
$I->scrollTo( [ 'css' => 'input[type=submit]' ], 20, 50 );
$I->click( 'Submit' );
$I->see( 'Thanks for contacting us! We will get in touch with you shortly.' );
// Login to wp-admin
$I->loginAsAdmin();
$I->seeInCurrentUrl( '/wp-admin/' );
// Go to Inbox
$I->amOnWorkflowPage( 'Inbox' );
$I->click( 'File Upload User Input' );
$I->attachFile( 'input[name=input_2]', 'gravityflow-logo.png' );
$I->click( 'Submit' );
$I->waitForElement( 'div.gravityflow_validation_error', 3 );
$I->selectOption( 'input[name=input_3]', 'Second Choice' );
$I->click( 'Submit' );
$I->waitForText( 'gravityflow-logo.png', 3 );
$I->seeLink( 'gravityflow-logo.png' );

View File

@@ -0,0 +1,21 @@
<?php
/*
* Purpose: Test calculations that use fields that are not editable or displayed
*/
$I = new AcceptanceTester( $scenario );
$I->wantTo( 'Test calculations that use fields that are not editable or displayed.');
$I->amOnPage( '/0006-hidden-field-calculations' );
$I->fillField( 'Single Line', 'Test' );
$I->fillField( 'Number', 2 );
$I->click( 'Submit' );
$I->loginAsAdmin();
$I->amOnWorkflowPage( 'Inbox' );
$I->click( 'Hidden Field Calculations' );
$I->waitForText( 'Single Line', 3 );
$I->seeInField( 'Number 2', '4' );
$I->seeInField( 'Number 3', '8' );

View File

@@ -0,0 +1,77 @@
<?php
/*
* Purpose: Test the job apply workflow
*/
$I = new AcceptanceTester( $scenario );
$I->wantTo( 'Test the job apply workflow' );
// Submit the form
$I->amOnPage( '/0007-job-apply-agency' );
$I->see( 'Job Apply Agency' );
$I->scrollTo( [ 'css' => '.gform_title' ], 20, 50 ); // needed for chromedriver
$I->fillField( 'input[name="input_3.3"]', 'First' );
$I->fillField( 'input[name="input_3.6"]', 'Last' );
$I->selectOption( 'select[name="input_2"]', 'Female' );
$I->selectOption( 'select[name="input_6"]', '65 or Above' );
$I->selectOption( 'select[name="input_7"]', 'Homemaker' );
$I->selectOption( 'select[name="input_8"]', 'Seasonal' );
$I->scrollTo( [ 'css' => 'input[type=submit]' ], 20, 50 ); // needed for chromedriver
$I->click( 'Submit' );
$I->waitForText( 'Thanks for contacting us! We will get in touch with you shortly.', 3 );
// Login as admin2
$I->loginAs( 'admin2', 'admin2' );
$I->seeInCurrentUrl( '/wp-admin/' );
// Go to Inbox
$I->amOnWorkflowPage( 'Inbox' );
$I->click( '0007 Job Apply Agency' );
// Approve
$I->fillField( 'textarea[name="gravityflow_note"]', 'Added to DB' );
$I->seeElement( 'button[value=approved]' );
$I->click( 'button[value=approved]' );
// Check data
$I->wait(1);
$I->fillField( 'input[name="input_4"]', '0210000000' );
$I->fillField( 'textarea[name="gravityflow_note"]', 'Phone added' );
$I->click( 'Submit' );
// Log out
$I->logOut();
// Login as admin1
$I->loginAs( 'admin1', 'admin1' );
$I->seeInCurrentUrl( '/wp-admin/' );
// Go to Inbox
$I->amOnWorkflowPage( 'Inbox' );
$I->click( '0007 Job Apply Agency' );
// Check data
$I->fillField( 'input[name="input_5"]', 'example@example.com' );
$I->fillField( 'textarea[name="gravityflow_note"]', 'Email added' );
$I->click( 'Submit' );
// Log out
$I->logOut();
// Login as Admin
$I->loginAsAdmin();
$I->seeInCurrentUrl( '/wp-admin/' );
// Go to Inbox
$I->amOnWorkflowPage( 'Inbox' );
$I->click( '0007 Job Apply Agency' );
// Approve
$I->fillField( 'textarea[name="gravityflow_note"]', 'Entry approved' );
$I->seeElement( 'button[value=approved]' );
$I->click( 'button[value=approved]' );
$I->waitForText( 'Status: Approved', 3 );

View File

@@ -0,0 +1,49 @@
<?php
/*
* Purpose: Test the approval steps
*/
$I = new AcceptanceTester( $scenario );
$I->wantTo( 'Test the approval steps' );
// Submit the form
$I->amOnPage( '/0008-request-salary-raise' );
$I->waitForText( 'Request Salary Raise', 3 );
$I->scrollTo( [ 'css' => '.gform_title' ], 20, 50 ); // needed for chromedriver
$I->fillField( 'input[name=input_1]', '20%' );
$I->selectOption( 'select[name=input_2]', 'Third Choice' );
$I->scrollTo( [ 'css' => 'input[type=submit]' ], 20, 50 ); // needed for chromedriver
$I->click( 'Submit' );
// trow number field error
$I->seeElement( 'div.validation_error' );
// fill number field with correct values
$I->fillField( 'input[name=input_1]', '1234' );
$I->scrollTo( [ 'css' => 'input[type=submit]' ], 20, 50 ); // needed for chromedriver
$I->click( 'Submit' );
$I->waitForText( 'Thanks for contacting us! We will get in touch with you shortly.', 3 );
// Login to wp-admin
$I->loginAsAdmin();
// Go to Inbox
$I->amOnWorkflowPage( 'Inbox' );
$I->waitForText( 'Request Salary Raise', 3 );
$I->click( '0008 Request Salary Raise' );
// Approve
$I->waitForElement( 'button[value=approved]', 3 );
$I->click( 'button[value=approved]' );
// Send to CEO
$I->selectOption( 'select[name=gravityflow_admin_action]', 'CEO approval' );
$I->click( 'Apply' );
// Approve
$I->waitForElement( 'button[value=approved]', 3 );
$I->click( 'button[value=approved]' );
$I->waitForText( 'Status: Approved', 3 );

View File

@@ -0,0 +1,30 @@
<?php
/*
* Purpose: Test scheduling a step
*/
$I = new AcceptanceTester( $scenario );
$I->wantTo( 'Test scheduling a step' );
// Submit the form
$I->amOnPage( '/0009-schedule-step' );
$I->waitForText( 'Schedule Step', 3 );
$I->scrollTo( [ 'css' => '.gform_title' ], 20, 50 ); // needed for chromedriver
$I->fillField( 'input[name="input_1"]', 'Some text' );
$I->fillField( 'textarea[name="input_2"]', 'Some paragraph text' );
$I->scrollTo( [ 'css' => 'input[type=submit]' ], 20, 50 ); // needed for chromedriver
$I->click( 'Submit' );
$I->waitForText( 'Thanks for contacting us! We will get in touch with you shortly.', 3 );
// Login to wp-admin
$I->loginAsAdmin();
$I->seeInCurrentUrl( '/wp-admin/' );
// Go to Status
$I->amOnWorkflowPage( 'Status' );
$I->waitForText( 'Schedule Step', 3 );
$I->click( '0009 Schedule Step' );
$I->waitForText( 'Send schedule notification (Queued)', 3 );

View File

@@ -0,0 +1,69 @@
<?php
/*
* Purpose: Test specific assign
*/
$I = new AcceptanceTester( $scenario );
$I->wantTo( 'Test specific assign' );
// Submit the form
$I->amOnPage( '/0010-specific-assign' );
$I->see( 'Specific Assign' );
$I->scrollTo( [ 'css' => '.gform_title' ], 20, 50 ); // needed for chromedriver
$I->fillField( 'input[name="input_1"]', 'Some text' );
$I->fillField( 'textarea[name="input_2"]', 'Some paragraph text' );
$I->fillField( 'input[name="input_3"]', 'Tag 1, Tag 2, Tag 3' );
$I->selectOption( 'input[name="input_4.2"]', 'Second Choice' );
$I->selectOption( 'input[name="input_4.3"]', 'Third Choice' );
$I->scrollTo( [ 'css' => 'input[type=submit]' ], 20, 50 ); // needed for chromedriver
$I->click( 'Submit' );
$I->see( 'Thanks for contacting us! We will get in touch with you shortly.' );
// Login to wp-admin
$I->loginAsAdmin();
$I->seeInCurrentUrl( '/wp-admin/' );
// Go to Inbox
$I->click( 'Workflow' );
$I->click( 'Inbox' );
$I->see( 'Workflow Inbox' );
$I->click( 'Specific Assign' );
// Approve
$I->seeElement( 'button[value=approved]' );
$I->click( 'button[value=approved]' );
// Log out
$I->logOut();
// Login as admin2
$I->loginAs( 'admin2', 'admin2' );
$I->seeInCurrentUrl( '/wp-admin/' );
// Go to Inbox
$I->amOnWorkflowPage( 'Inbox' );
$I->click( 'Specific Assign' );
// Approve
$I->waitForElement( 'button[value=approved]', 3 );
$I->click( 'button[value=approved]' );
// Log out
$I->logOut();
// Login as admin3
$I->loginAs( 'admin3', 'admin3' );
$I->seeInCurrentUrl( '/wp-admin/' );
// Go to Inbox
$I->amOnWorkflowPage( 'Inbox' );
$I->click( 'Specific Assign' );
// Approve
$I->waitForElement( 'button[value=approved]', 3 );
$I->click( 'button[value=approved]' );
$I->waitForText( 'Status: Approved', 3 );

View File

@@ -0,0 +1,33 @@
<?php
/*
* Purpose: Test step conditional logic
*/
$I = new AcceptanceTester( $scenario );
$I->wantTo( 'Test step conditional logic' );
$I->loginAsAdmin();
$I->amOnPage( '/0011-step-conditional-logic' );
$I->fillField( 'Single Line', 'test' );
$I->fillField( 'Paragraph', 'test' );
$I->selectOption( 'User', '1' );
$I->click( 'Submit' );
$I->amOnWorkflowPage( 'Inbox' );
$I->click( '0011 Step Conditional Logic' );
$I->waitforText( 'Approval if Created By ID1' );
$I->see( 'Approval if Created By ID1', '.gravityflow-status-box' );
$I->dontSee( 'Approval if Created By ID2', '.gravityflow-status-box' );
$I->click( 'Approve' );
$I->waitforText( 'Approval if User Field ID1' );
$I->see( 'Approval if User Field ID1', '.gravityflow-status-box' );
$I->dontSee( 'Approval if User Field ID2', '.gravityflow-status-box' );
$I->click( 'Approve' );
$I->see( 'Entry Approved' );

View File

@@ -0,0 +1,54 @@
<?php
/*
* Purpose: Test revert user
*/
$I = new AcceptanceTester( $scenario );
$I->wantTo( 'Test Revert User' );
// Submit the form
$I->amOnPage( '/0012-test-revert-user' );
$I->see( 'Test Revert User' );
$I->scrollTo( [ 'css' => '.gform_title' ], 20, 50 ); // needed for chromedriver
$I->fillField( 'input[name="input_1"]', 'Some text' );
$I->selectOption( 'select[name="input_2"]', 'Second Choice' );
// Next page
$I->click( '.gform_page_footer .gform_next_button' );
$I->fillField( 'input[name="input_4"]', '42' );
$I->scrollTo( [ 'css' => 'input[type=submit]' ], 20, 50 ); // needed for chromedriver
$I->click( 'Submit' );
$I->see( 'Thanks for contacting us! We will get in touch with you shortly.' );
// Login to wp-admin
$I->loginAsAdmin();
$I->seeInCurrentUrl( '/wp-admin/' );
// Go to Inbox
$I->amOnWorkflowPage( 'Inbox' );
$I->click( '0012 Test Revert User' );
// Approve
$I->waitForElement( 'button[value=approved]', 3 );
$I->click( 'button[value=approved]' );
// Verify number
$I->seeElement( 'input[name="input_4"]' );
$I->fillField( 'input[name="input_4"]', '40' );
$I->click( 'Submit' );
// Revert
$I->waitForElement( 'button[value=revert]', 3 );
$I->click( 'button[value=revert]' );
// Update number
$I->waitForElement( 'input[name="input_4"]', 3 );
$I->fillField( 'input[name="input_4"]', '41' );
$I->click( 'Submit' );
// Approve
$I->waitForElement( 'button[value=approved]', 3 );
$I->click( 'button[value=approved]' );
$I->see( 'Entry Approved' );

View File

@@ -0,0 +1,51 @@
<?php
/*
* Purpose: Test total depending on quantity
*/
$I = new AcceptanceTester( $scenario );
$I->wantTo( 'Test total depending on quantity' );
// Submit the form
$I->amOnPage( '/0013-total-depending-on-quantity' );
$I->see( '0013 Total Depending On Quantity' );
$I->scrollTo( [ 'css' => '.gform_title' ], 20, 50 ); // needed for chromedriver
$I->fillField( 'input[name="input_1"]', 'Some text' );
$I->fillField( 'textarea[name="input_2"]', 'Some paragraph text' );
$I->selectOption( 'input[name=input_4]', 'Second Choice' );
$I->selectOption( 'select[name="input_5"]', 'Medium' );
$I->fillField( 'input[name="input_6"]', '1' );
$I->scrollTo( [ 'css' => '.gfield_shipping' ], 20, 50 );
$I->selectOption( 'input[name="input_7"]', 'Third Choice' );
$I->see( '$24.00' );
$I->scrollTo( [ 'css' => 'input[type=submit]' ], 20, 50 ); // needed for chromedriver
$I->click( 'Submit' );
$I->waitForText( 'Thanks for contacting us! We will get in touch with you shortly.', 3 );
// Login to wp-admin
$I->loginAsAdmin();
$I->seeInCurrentUrl( '/wp-admin/' );
// Go to Inbox
$I->amOnWorkflowPage( 'Inbox' );
$I->click( '0013 Total Depending On Quantity' );
// Approve
$I->fillField( 'textarea[name="gravityflow_note"]', 'Change quantity to 2' );
$I->seeElement( 'button[value=rejected]' );
$I->click( 'button[value=rejected]' );
// Change quantity
$I->seeElement( 'input[name="input_6"]' );
$I->fillField( 'input[name="input_6"]', '2' );
$I->click( 'Submit' );
// Approve
$I->waitForText( '$44.00', 3 );
$I->seeElement( 'button[value=approved]' );
$I->click( 'button[value=approved]' );
$I->see( 'Entry Approved' );

View File

@@ -0,0 +1,47 @@
<?php
/*
* Purpose: Test the two pages on the user input step
*/
$I = new AcceptanceTester( $scenario );
$I->wantTo( 'Test the two pages on the user input step' );
// Submit the form
$I->amOnPage( '/0014-two-pages-rejected' );
$I->makeScreenshot( 'Form loaded.' );
$I->see( '0014 Two Pages Rejected' );
$I->scrollTo( [ 'css' => '.gform_title' ], 20, 50 ); // needed for chromedriver
$I->selectOption( 'input[name=input_7]', 'Third Choice' );
$I->scrollTo( [ 'css' => '.gform_page_footer .gform_next_button' ], 20, 50 ); // needed for chromedriver
// Next page
$I->click( '.gform_page_footer .gform_next_button' );
$I->selectOption( 'select[name=input_20]', 'Third Choice' );
$I->makeScreenshot( 'Before form submit.' );
$I->click( 'input[type=submit]' );
$I->makeScreenshot( 'Form submitted.' );
$I->see( 'Thanks for contacting us!' );
// Login to wp-admin
$I->loginAsAdmin();
$I->seeInCurrentUrl( '/wp-admin/' );
// Go to Inbox
$I->amOnWorkflowPage( 'Inbox' );
$I->click( '0014 Two Pages Rejected' );
// Reject
$I->click( 'Reject' );
// Complete
$I->waitForText( 'Rejected request (Pending Input)', 3 );
$I->click( 'Submit' );
$I->waitForText( 'Status: Rejected', 3 );

View File

@@ -0,0 +1,41 @@
<?php
/*
* Purpose: Test the field conditional logic on the user input step
*/
$I = new AcceptanceTester( $scenario );
$I->wantTo( 'Test the field conditional logic on the user input step' );
// Submit the form
$I->amOnPage( '/0015-user-input' );
$I->see( '0015 User Input' );
$I->scrollTo( [ 'css' => '.gform_title' ], 20, 50 ); // needed for chromedriver
$I->fillField( 'Paragraph', 'Some text' );
$I->scrollTo( [ 'css' => 'input[type=submit]' ], 20, 50 ); // needed for chromedriver
// Next page
$I->click( 'Submit' );
$I->waitForText( 'Thanks for contacting us!', 3 );
// Login to wp-admin
$I->loginAsAdmin();
$I->seeInCurrentUrl( '/wp-admin/' );
// Go to Inbox
$I->amOnWorkflowPage( 'Inbox' );
$I->click( '0015 User Input' );
$I->selectOption( 'input[name=gravityflow_status]', 'complete' );
$I->click( 'Update' );
// Approve
$I->waitForElement( 'div.validation_message', 3 );
// Check field conditional logic on the user input step
$I->see( 'This field is required' );
$I->selectOption( 'input[name=input_13]', 'Second Choice' );
$I->scrollTo( '#gravityflow-note' );
$I->selectOption( 'input[name=gravityflow_status]', 'complete' );
$I->click( 'Update' );
$I->waitForElement( 'div.notice-success', 3 );
$I->waitForText( 'Entry updated and marked complete', 3 );

View File

@@ -0,0 +1,35 @@
<?php
/*
* Purpose: Test the vacation request form
*/
$I = new AcceptanceTester( $scenario );
$I->wantTo( 'Test the vacation request form' );
// Submit the form
$I->amOnPage( '/0016-vacation-request' );
$I->see( '0016 Vacation Request' );
$I->scrollTo( [ 'css' => '.gform_title' ] );
$I->fillField('First', 'Some');
$I->fillField('Last', 'Text');
$I->selectOption( 'Dep', 'Third Choice' );
$I->fillField( 'Third choice text', 'Third choice text' );
$I->fillField( 'Date from', '08/17/2016' );
$I->fillField( 'Date to', '08/18/2016' );
$I->fillField( 'Comments', 'Comments text' );
$I->scrollTo( [ 'css' => 'input[type=submit]' ] );
$I->click( 'input[type=submit]' );
// Login to wp-admin
$I->loginAsAdmin();
$I->seeInCurrentUrl( '/wp-admin/' );
// Go to Inbox
$I->amOnWorkflowPage( 'Inbox' );
$I->click( '0016 Vacation Request' );
// Approve
$I->waitForElement( 'button[value=approved]', 3 );
$I->click( 'button[value=approved]' );
$I->see( 'Entry Approved' );

View File

@@ -0,0 +1,47 @@
<?php
/*
* Purpose: Test workflow required fields
*/
$I = new AcceptanceTester( $scenario );
$I->wantTo( 'Test workflow required fields' );
// Submit the form
$I->amOnPage( '/0017-workflow-required-fields' );
$I->see( '0017 Workflow Required Fields' );
$I->scrollTo( [ 'css' => '.gform_title' ], 20, 50 ); // needed for chromedriver
$I->fillField( 'input[name="input_2"]', 'Text' );
$I->fillField( 'textarea[name="input_1"]', 'Pharagraph text' );
$I->scrollTo( [ 'css' => 'input[type=submit]' ], 20, 50 ); // needed for chromedriver
$I->click( 'Submit' );
$I->see( 'Thanks for contacting us! We will get in touch with you shortly.' );
// Login as Admin
$I->loginAsAdmin();
$I->seeInCurrentUrl( '/wp-admin/' );
// Go to Inbox
$I->amOnWorkflowPage( 'Inbox' );
$I->click( '0017 Workflow Required Fields' );
$I->see( 'Instructions: please review the values in the fields below and click on the Approve or Reject button' );
$I->seeElement( 'button[value=approved]' );
$I->click( 'button[value=approved]' );
$I->waitForText( 'A note is required', 3 );
$I->fillField( 'textarea[name="gravityflow_note"]', 'First note added' );
$I->click( 'button[value=approved]' );
$I->waitForText( 'Editable instructions.', 3 );
$I->seeElement( 'input[name=gravityflow_status]' );
$I->click( 'Update' );
$I->waitForText( 'A note is required', 3 );
$I->fillField( 'textarea[name="gravityflow_note"]', 'Second note added' );
$I->click( 'Update' );
$I->selectOption( 'input[name="gravityflow_status"]', 'Complete' );
$I->click( 'Update' );
$I->waitForText( 'Entry updated and marked complete.', 3 );

View File

@@ -0,0 +1,41 @@
<?php
/*
* Purpose: Test the vacation request form with rejected note
*/
$I = new AcceptanceTester( $scenario );
$I->wantTo( 'Test the vacation request form with rejected note' );
// Submit the form
$I->amOnPage( '/0018-vacation-request-reject-note' );
$I->see( '0018 Vacation Request Reject Note' );
$I->scrollTo( [ 'css' => '.gform_title' ] );
$I->fillField('First', 'Some');
$I->fillField('Last', 'Text');
$I->selectOption( 'Dep', 'Third Choice' );
$I->fillField( 'Third choice text', 'Third choice text' );
$I->fillField( 'Date from', '08/17/2016' );
$I->fillField( 'Date to', '08/18/2016' );
$I->fillField( 'Comments', 'Comments text' );
$I->scrollTo( [ 'css' => 'input[type=submit]' ] );
$I->click( 'input[type=submit]' );
// Login to wp-admin
$I->loginAsAdmin();
$I->seeInCurrentUrl( '/wp-admin/' );
// Go to Inbox
$I->amOnWorkflowPage( 'Inbox' );
$I->click( 'Vacation Request' );
// Reject without note
$I->waitForElement( 'button[value=rejected]', 3 );
$I->click( 'button[value=rejected]' );
// Reject with note
$I->waitForElement( 'button[value=rejected]', 3 );
$I->see( 'A note is required' );
$I->fillField( ['name' => 'gravityflow_note'], 'Dates are expired.' );
$I->click( 'button[value=rejected]' );
$I->see( 'Entry Rejected' );

View File

@@ -0,0 +1,37 @@
<?php
/*
* Purpose: Test if editable fields highlighted on the user input step
*/
$I = new AcceptanceTester( $scenario );
$I->wantTo( 'Test if editable fields highlighted on the user input step' );
// Submit the form
$I->amOnPage( '/0019-user-input-highlight-editable-fields' );
$I->see( '0019 User Input Highlight Editable Fields' );
$I->scrollTo( [ 'css' => '.gform_title' ] );
$I->fillField( 'Paragraph', 'Some text' );
$I->selectOption( 'Dropdown', 'Third Choice' );
$I->fillField( 'Email', 'test@gmail.com' );
$I->scrollTo( [ 'css' => 'input[type=submit]' ] );
$I->click( 'Submit' );
$I->waitForText( 'Thanks for contacting us!', 3 );
// Login to wp-admin
$I->loginAsAdmin();
$I->seeInCurrentUrl( '/wp-admin/' );
// Go to Inbox
$I->amOnWorkflowPage( 'Inbox' );
$I->click( '0019 User Input Highlight Editable Fields' );
// Find 3 highlighted fields
$I->see( 'Paragraph', ['css' => '.green-background label'] );
$I->see( 'Dropdown', ['css' => '.green-background label'] );
$I->see( 'Admin only radio required', ['css' => '.green-background label'] );
// Can't find other fields highlighted
$I->cantsee( 'Email', ['css' => '.green-background label'] );
$I->cantsee( 'Calc', ['css' => '.green-background label'] );
$I->cantsee( 'Checkboxes', ['css' => '.green-background label'] );

View File

@@ -0,0 +1,35 @@
<?php
//$scenario->skip();
/*
* Test summary: perform step if previous step status is rejected
*
* Test details:
* - Fill in the form fields.
* - Login to back-end, go to Inbox
* - Click on the 'Step Status Conditional Logic' Workflow
* - Click on the 'Reject' button
* - Go to 'Approval if Previous Approval Step Rejected' step
* - Click on the 'Approve' button
*/
$I = new AcceptanceTester( $scenario );
$I->loginAsAdmin();
$I->amOnPage( '/step-status-conditional-logic' );
$I->fillField( 'Single Line', 'test' );
$I->fillField( 'Paragraph', 'test' );
$I->selectOption( 'User', '1' );
$I->click( 'Submit' );
$I->amOnWorkflowPage( 'Inbox' );
$I->click( 'Step Status Conditional Logic' );
$I->waitforText( 'Approval Step' );
$I->see( 'Approval Step', '.gravityflow-status-box' );
$I->click( 'Reject' );
$I->waitforText( 'Approval if Previous Approval Step Rejected' );
$I->see( 'Approval if Previous Approval Step Rejected', '.gravityflow-status-box' );
$I->dontSee( 'Approval if Previous Approval Step Approved', '.gravityflow-status-box' );

View File

@@ -0,0 +1,42 @@
<?php
/*
* Purpose: Test the section field conditional logic on the user input step
*/
$I = new AcceptanceTester( $scenario );
$I->wantTo( 'Test the section field conditional logic on the user input step' );
// Submit the form
$I->amOnPage( '/0021-hs4878-user-input-section-logic' );
$I->see( '0021 HS4878 User Input Section Logic' );
$I->scrollTo( [ 'css' => '.gform_title' ], 20, 50 ); // needed for chromedriver
$I->checkOption( 'input[name=input_1\\.2]' );
$I->click( 'input[type=submit]' );
$I->waitForText( 'Thanks for contacting us! We will get in touch with you shortly.', 3 );
// Login to wp-admin
$I->loginAsAdmin();
$I->seeInCurrentUrl( '/wp-admin/' );
// Go to Inbox
$I->amOnWorkflowPage( 'Inbox' );
$I->click( 'HS4878 User Input Section Logic' );
$I->waitForText( 'Second Choice', 3 );
$I->dontSee( 'Hidden Section' );
$I->dontSeeElement( 'input[name=input_3]' );
$I->see( 'Visible Section' );
$I->seeElement( 'input[name=input_5]' );
$I->fillField( 'Text Two', 'Value Two' );
$I->click( 'Submit' );
$I->waitForText( 'Entry updated and marked complete.', 3 );
$I->dontSee( 'Hidden Section' );
$I->dontSee( 'Value One' );
$I->see( 'Visible Section' );
$I->see( 'Value Two' );

View File

@@ -0,0 +1,51 @@
<?php
/*
* Purpose: Test if "send to step" admin action can work after workflow completed
*/
$I = new AcceptanceTester( $scenario );
$I->wantTo( 'Test if "send to step" admin action can work after workflow completed' );
$I->amOnPage( '/0022-send-to-step' );
$I->amGoingTo( 'Submit the form.' );
$I->see( '0022 Send To Step' );
$I->scrollTo( [ 'css' => '.gform_title' ] );
$I->fillField( 'Text Field', 'Some text' );
$I->fillField( 'Email Field', 'test@gmail.com' );
$I->scrollTo( [ 'css' => 'input[type=submit]' ] );
$I->click( 'Submit' );
$I->waitForText( 'Thanks for contacting us!', 3 );
$I->amGoingTo( 'Log into WP Dashboard.' );
$I->loginAsAdmin();
$I->seeInCurrentUrl( '/wp-admin/' );
$I->amGoingTo( 'View Workflow Inbox.' );
$I->amOnWorkflowPage( 'Inbox' );
$I->amGoingTo( 'Approve the entry to complete the Approval Step.' );
$I->click( '0022 Send To Step' );
$I->seeElement( 'button[value=approved]' );
$I->click( 'button[value=approved]' );
$I->waitForText( 'Entry Approved', 3 );
$I->amGoingTo( 'Submit the form to complete the User Input Step and also complete the workflow.' );
$I->see( 'User Input (Pending Input)' );
$I->click( 'input[value=Submit]' );
$I->waitForText( 'Entry updated and marked complete.', 3 );
$I->amGoingTo( 'View Workflow Status.' );
$I->amOnWorkflowPage( 'Status' );
$I->amGoingTo( 'Make sure the entry has been approved.' );
$I->click( '0022 Send To Step' );
$I->waitForText( 'Status: Approved', 3 );
$I->amGoingTo( 'Select and admin action that send this entry to Notification Step.' );
$I->selectOption( '//*[@id="gravityflow-admin-action"]', 'Notification Step' );
$I->click( 'input[name=_gravityflow_admin_action]' );
$I->waitForText( 'Sent to step: Notification Step', 3 );
$I->scrollTo( ['css' => '.gravityflow-note-notification'], 20, 50 );
$I->seeNumberOfElements( ['css' => '.gravityflow-note-notification'], 2 );

View File

@@ -0,0 +1,65 @@
<?php
/*
* Purpose: Test the save progress types
*/
$I = new AcceptanceTester( $scenario );
$I->wantTo( 'Test the save progress types for user input step' );
// Submit the form
$I->amOnPage( '/0023-user-input-save-progress' );
$I->see( '0023 - User Input Save Progress' );
$I->scrollTo( [ 'css' => '.gform_title' ] ); // needed for chromedriver
$I->selectOption( 'input[name=input_1]', 'Blue' );
$I->fillField( 'textarea[name="input_2"]', 'Ozone tints the light of the sun' );
$I->scrollTo( [ 'css' => 'input[type=submit]' ] ); // needed for chromedriver
$I->click( 'Submit' );
$I->waitForText( 'Thanks for contacting us! We will get in touch with you shortly.', 3 );
// Login to wp-admin
$I->loginAsAdmin();
// Go to Inbox
$I->amOnWorkflowPage( 'Inbox' );
// Test - Submit Buttons
$I->click( '0023 - User Input Save Progress' );
$I->waitForText( 'Save Progress - Submit Buttons (Pending Input)' );
$I->see( 'Save Progress - Submit Buttons (Pending Input)' );
$I->click( '#gravityflow_save_progress_button' );
$I->waitForText( 'Entry updated - in progress.' );
$I->see( 'Entry updated - in progress.' );
$I->click( '#gravityflow_submit_button' );
$I->waitForText( 'Entry updated and marked complete.' );
$I->see( 'Entry updated and marked complete.' );
// Test - Radio Buttons - In Progress
$I->waitForText( 'Save Progress - Radio Buttons - In Progress Default (Pending Input)' );
$I->see( 'Save Progress - Radio Buttons - In Progress Default (Pending Input)' );
$I->seeOptionIsSelected( 'input[name=gravityflow_status]', 'in_progress' );
$I->click( '#gravityflow_update_button' );
$I->waitForText( 'Entry updated - in progress.' );
$I->see( 'Entry updated - in progress.' );
$I->click( 'input#gravityflow_complete' );
$I->click( '#gravityflow_update_button' );
$I->waitForText( 'Entry updated and marked complete.' );
$I->see( 'Entry updated and marked complete.' );
// Test - Radio Buttons - Complete
$I->waitForText( 'Save Progress - Radio Buttons - Complete Default (Pending Input)' );
$I->see( 'Save Progress - Radio Buttons - Complete Default (Pending Input)' );
$I->seeOptionIsSelected( 'input[name=gravityflow_status]', 'complete' );
$I->click( '#gravityflow_update_button' );
$I->waitForText( 'Entry updated and marked complete.' );
$I->see( 'Entry updated and marked complete.' );
// Test - Disabled
$I->waitForText( 'Save Progress - Disabled (Pending Input)' );
$I->see( 'Save Progress - Disabled (Pending Input)' );
$I->dontSeeElement( 'input[name=gravityflow_status]' );
$I->click( '#gravityflow_update_button' );
$I->waitForText( 'Entry updated and marked complete.' );
$I->see( 'Entry updated and marked complete.' );

View File

@@ -0,0 +1,46 @@
<?php
/*
* Purpose: Test that calculated product fields hidden by conditional logic do not reappear in the order summary after the user input step saves the entry.
*/
$I = new AcceptanceTester( $scenario );
$I->wantTo( 'Test that calculated product fields hidden by conditional logic do not reappear in the order summary after the user input step saves the entry.' );
// Submit the form
$I->amOnPage( '/0024-hs5197-calculated-product-logic' );
$I->see( '0024 HS5197 Calculated Product Logic' );
$I->scrollTo( [ 'css' => '.gform_title' ], 20, 50 ); // needed for chromedriver
$I->click( 'input[type=submit]' );
$I->waitForText( 'Thanks for contacting us! We will get in touch with you shortly.', 3 );
// Login to wp-admin
$I->loginAsAdmin();
$I->seeInCurrentUrl( '/wp-admin/' );
// Go to Inbox
$I->amOnWorkflowPage( 'Inbox' );
$I->click( '0024 HS5197 Calculated Product Logic' );
$I->waitForText( 'Checkbox', 3 );
$I->dontSee( 'First Number' );
$I->see( 'Order' );
$I->dontSee( 'First Product' );
$I->see( 'Second Product' );
$I->see( '$50.00' );
$I->click( 'Submit' );
$I->waitForText( 'Entry updated and marked complete.', 3 );
$I->see( 'Checkbox' );
$I->see( 'Second Choice' );
$I->dontSee( 'First Number' );
$I->see( 'Order' );
$I->dontSee( 'First Product' );
$I->dontSee( '$0.00' );
$I->see( 'Second Product' );
$I->see( '$50.00' );

View File

@@ -0,0 +1,60 @@
<?php
/*
* Purpose: Test that the display fields setting displays the correct fields on the workflow detail page.
*/
$I = new AcceptanceTester( $scenario );
$I->wantTo( 'Test that the display fields setting displays the correct fields on the workflow detail page.' );
// Submit the form
$I->amOnPage( '/0025-display-fields' );
$I->see( '0025 Display Fields' );
$I->scrollTo( [ 'css' => '.gform_title' ], 20, 50 ); // needed for chromedriver
$I->click( 'input[type=submit]' );
$I->waitForText( 'Thanks for contacting us! We will get in touch with you shortly.', 3 );
// Login to wp-admin
$I->loginAsAdmin();
$I->seeInCurrentUrl( '/wp-admin/' );
// Go to Inbox
$I->amOnWorkflowPage( 'Inbox' );
$I->click( '0025 Display Fields' );
// Approval Step - Display: All Fields.
$I->waitForText( '0025 Display Fields : Entry #', 3 );
$I->see( 'Value 1' );
$I->see( 'Section 1' );
$I->see( 'Value 2' );
$I->see( 'Section 2' );
$I->see( 'Value 3' );
$I->click( 'Approve' );
// User Input Step - Display: All Fields Except
$I->waitForText( 'Entry Approved', 3 );
$I->see( 'Value 1' );
$I->see( 'Section 1' );
$I->seeElement( 'input[name=input_3]' );
$I->fillField( 'Two', 'Value 2 - Updated' );
$I->dontSee( 'Section 2' );
$I->dontSee( 'Value 3' );
$I->click( 'Submit' );
// Approval Step - Display: Selected Fields.
$I->waitForText( 'Entry updated and marked complete.', 3 );
$I->dontSee( 'Value 1' );
$I->dontSee( 'Section 1' );
$I->dontSee( 'Value 2 - Updated' );
$I->see( 'Section 2' );
$I->see( 'Value 3' );
$I->click( 'Approve' );
// Workflow Completed - Display: All Fields.
$I->waitForText( 'Entry Approved', 3 );
$I->see( 'Value 1' );
$I->see( 'Section 1' );
$I->see( 'Value 2 - Updated' );
$I->see( 'Section 2' );
$I->see( 'Value 3' );

View File

@@ -0,0 +1,43 @@
<?php
/*
* Purpose: Test that the display fields setting displays the correct fields on the workflow detail page.
*/
$I = new AcceptanceTester( $scenario );
$I->wantTo( 'Test that the Role Assignee Token works.' );
// Make sure we're logged out
$I->logOut();
$I->resetCookie( 'gflow_access_token' );
// Submit the form
$I->amOnPage( '/0026-role-assignee-token' );
$I->see( '0026 Role Assignee Token' );
$I->scrollTo( [ 'css' => '.gform_title' ], 20, 50 ); // needed for chromedriver
$I->fillField( 'Single Line Text', 'Test' );
$I->fillField( 'Paragraph', 'Test' );
$I->click( 'input[type=submit]' );
$I->waitForText( 'Thanks for contacting us! We will get in touch with you shortly.', 3 );
$I->amOnPage( sanitize_title_with_dashes( '0026 Email - Role Assignee - Token - Approval' ) );
$I->see( 'Open Workflow Entry Detail' );
$I->click( 'Open Workflow Entry Detail' );
$I->waitForText( 'Approve', 3 );
$I->click( 'Approve' );
$I->waitForText( 'User Input (Pending Input)', 3 );
$I->resetCookie( 'gflow_access_token' );
$I->amOnPage( sanitize_title_with_dashes( '0026 Email - Role Assignee - Token - Approval' ) );
$I->see( 'Open Workflow Entry Detail' );
$I->click( 'Open Workflow Entry Detail' );
$I->fillField( 'Single Line Text', 'Test2' );
$I->fillField( 'Paragraph', 'Test2' );
$I->click( 'Submit' );
$I->waitForText( 'Status: Approved', 3 );
$I->see( 'Status: Approved' );

View File

@@ -0,0 +1,112 @@
<?php
global $wp_rewrite, $wpdb;
$wp_rewrite->set_permalink_structure( '/%postname%/' );
$wp_rewrite->flush_rules();
GFFormsModel::drop_tables();
// Flush out the feeds
$wpdb->query( "TRUNCATE TABLE {$wpdb->prefix}gf_addon_feed" );
GFForms::setup( true );
update_option( 'gform_pending_installation', false );
update_option( 'gravityflow_pending_installation', false );
function setup_gravity_forms_pages() {
require_once( GFCommon::get_base_path() . '/export.php' );
$form_filenames = glob( dirname( __FILE__ ) . '/../_data/forms/*.json' );
foreach ( $form_filenames as $filename ) {
GFExport::import_file( $filename );
}
$active_forms = GFAPI::get_forms( true );
echo "\nActive Form count: " . count( $active_forms );
$inactive_forms = GFAPI::get_forms( false );
echo "\nInactive Form count: " . count( $inactive_forms );
$forms = array_merge( $active_forms, $inactive_forms );
echo "\nForm count: " . count( $forms );
foreach ( $forms as $form ) {
GFFormsModel::update_form_active( $form['id'], true );
$page = array(
'post_type' => 'page',
'post_content' => '[gravityform id=' . $form['id'] . ']',
'post_name' => sanitize_title_with_dashes( $form['title'] ),
'post_parent' => 0,
'post_author' => 1,
'post_status' => 'publish',
'post_title' => $form['title'],
);
wp_insert_post( $page );
}
}
setup_gravity_forms_pages();
// add admins
function tests_create_testing_users() {
$users = array( 'admin1', 'admin2', 'admin3', 'admin4', 'admin5' );
foreach ( $users as $user ) {
$userData = array(
'user_login' => $user,
'first_name' => $user,
'last_name' => $user,
'user_pass' => $user,
'user_email' => $user . '@mail.com',
'user_url' => '',
'role' => 'administrator',
);
wp_insert_user( $userData );
}
}
tests_create_testing_users();
function copy_to_dir( $pattern, $dir ) {
foreach ( glob( $pattern ) as $file ) {
if ( ! is_dir( $file ) && is_readable( $file ) ) {
$dest = realpath( $dir ) . DIRECTORY_SEPARATOR . basename( $file );
copy( $file, $dest );
}
}
}
if ( ! is_dir( WPMU_PLUGIN_DIR ) ) {
mkdir( WPMU_PLUGIN_DIR );
};
echo 'Copying mu plugins to ' . WP_CONTENT_DIR . '/mu-plugins';
copy_to_dir( dirname( dirname( __FILE__ ) ) . '/_mu-plugins/*.php', WPMU_PLUGIN_DIR );
$settings = gravity_flow()->get_app_settings();
$settings['inbox_page'] = create_workflow_page( 'inbox' );
$settings['status_page'] = create_workflow_page( 'status' );
$settings['submit_page'] = create_workflow_page( 'submit' );
gravity_flow()->update_app_settings( $settings );
/**
* Creates a new page containing the gravityflow shortcode for the specified page type.
*
* @param string $page The page type: inbox, status, or submit.
*
* @return int|string|WP_Error
*/
function create_workflow_page( $page ) {
$post = array(
'post_title' => $page,
'post_content' => sprintf( '[gravityflow page="%s"]', $page ),
'post_excerpt' => $page,
'post_status' => 'publish',
'post_type' => 'page',
);
$post_id = wp_insert_post( $post );
return $post_id ? $post_id : '';
}

View File

@@ -0,0 +1,13 @@
The easiest way to run the acceptance tests is to run them in Docker.
Requirements:
- docker
- docker compose
Run the acceptance tests using start.sh. For example:
bash start.sh
You can watch Chrome perform the tests via VNC on localhost:5900. On OSX open vnc://localhost:5900 in Safari. Password: secret.
Optionally, you can remove the containers when you've finished:
docker-compose down

View File

@@ -0,0 +1,14 @@
#!/usr/bin/env bash
cd ../../
# Run just one test
#docker-compose run --rm codeception run tests/acceptance-tests/acceptance/0026RoleAssigneeTokenCept.php -vvv --html
# Run tests in a group.
# Create groups by adding the following comment to the top of the tests
# // @group myGroup
#docker-compose run --rm codeception run -g myGroup -vvv --html
# Run all tests
docker-compose run --rm codeception run -vvv --html

View File

@@ -0,0 +1,127 @@
#!/usr/bin/env bash
if [ $# -lt 3 ]; then
echo "usage: $0 <db-name> <db-user> <db-pass> [db-host] [wp-version]"
exit 1
fi
DB_NAME=$1
DB_USER=$2
DB_PASS=$3
DB_HOST=${4-localhost}
WP_VERSION=${5-latest}
WP_TESTS_DIR="${PWD}/tmp/wordpress-tests-lib"
WP_CORE_DIR="${PWD}/tmp/wordpress/"
download() {
if [ `which curl` ]; then
curl -s "$1" > "$2";
elif [ `which wget` ]; then
wget -nv -O "$2" "$1"
fi
}
if [[ $WP_VERSION =~ [0-9]+\.[0-9]+(\.[0-9]+)? ]]; then
WP_TESTS_TAG="tags/$WP_VERSION"
elif [[ $WP_VERSION == 'nightly' || $WP_VERSION == 'trunk' ]]; then
WP_TESTS_TAG="trunk"
else
# http serves a single offer, whereas https serves multiple. we only want one
download http://api.wordpress.org/core/version-check/1.7/ /tmp/wp-latest.json
grep '[0-9]+\.[0-9]+(\.[0-9]+)?' /tmp/wp-latest.json
LATEST_VERSION=$(grep -o '"version":"[^"]*' /tmp/wp-latest.json | sed 's/"version":"//')
if [[ -z "$LATEST_VERSION" ]]; then
echo "Latest WordPress version could not be found"
exit 1
fi
WP_TESTS_TAG="tags/$LATEST_VERSION"
fi
set -ex
install_wp() {
if [ -d $WP_CORE_DIR ]; then
return;
fi
mkdir -p $WP_CORE_DIR
if [[ $WP_VERSION == 'nightly' || $WP_VERSION == 'trunk' ]]; then
mkdir -p /tmp/wordpress-nightly
download https://wordpress.org/nightly-builds/wordpress-latest.zip /tmp/wordpress-nightly/wordpress-nightly.zip
unzip -q /tmp/wordpress-nightly/wordpress-nightly.zip -d /tmp/wordpress-nightly/
mv /tmp/wordpress-nightly/wordpress/* $WP_CORE_DIR
else
if [ $WP_VERSION == 'latest' ]; then
local ARCHIVE_NAME='latest'
else
local ARCHIVE_NAME="wordpress-$WP_VERSION"
fi
download https://wordpress.org/${ARCHIVE_NAME}.tar.gz /tmp/wordpress.tar.gz
tar --strip-components=1 -zxmf /tmp/wordpress.tar.gz -C $WP_CORE_DIR
fi
download https://raw.github.com/markoheijnen/wp-mysqli/master/db.php $WP_CORE_DIR/wp-content/db.php
}
install_gravity_forms(){
if [ -d ${PWD}/../gravityforms ]; then
cp -r ${PWD}/../gravityforms $PWD/tmp/gravityforms
fi
}
install_test_suite() {
# portable in-place argument for both GNU sed and Mac OSX sed
if [[ $(uname -s) == 'Darwin' ]]; then
local ioption='-i .bak'
else
local ioption='-i'
fi
# set up testing suite if it doesn't yet exist
if [ ! -d $WP_TESTS_DIR ]; then
# set up testing suite
mkdir -p $WP_TESTS_DIR
svn co --quiet https://develop.svn.wordpress.org/${WP_TESTS_TAG}/tests/phpunit/includes/ $WP_TESTS_DIR/includes
fi
if [ ! -f wp-tests-config.php ]; then
download https://develop.svn.wordpress.org/${WP_TESTS_TAG}/wp-tests-config-sample.php "$WP_TESTS_DIR"/wp-tests-config.php
sed $ioption "s:dirname( __FILE__ ) . '/src/':'$WP_CORE_DIR':" "$WP_TESTS_DIR"/wp-tests-config.php
sed $ioption "s/youremptytestdbnamehere/$DB_NAME/" "$WP_TESTS_DIR"/wp-tests-config.php
sed $ioption "s/yourusernamehere/$DB_USER/" "$WP_TESTS_DIR"/wp-tests-config.php
sed $ioption "s/yourpasswordhere/$DB_PASS/" "$WP_TESTS_DIR"/wp-tests-config.php
sed $ioption "s|localhost|${DB_HOST}|" "$WP_TESTS_DIR"/wp-tests-config.php
fi
}
install_db() {
# parse DB_HOST for port or socket references
local PARTS=(${DB_HOST//\:/ })
local DB_HOSTNAME=${PARTS[0]};
local DB_SOCK_OR_PORT=${PARTS[1]};
local EXTRA=""
if ! [ -z $DB_HOSTNAME ] ; then
if [ $(echo $DB_SOCK_OR_PORT | grep -e '^[0-9]\{1,\}$') ]; then
EXTRA=" --host=$DB_HOSTNAME --port=$DB_SOCK_OR_PORT --protocol=tcp"
elif ! [ -z $DB_SOCK_OR_PORT ] ; then
EXTRA=" --socket=$DB_SOCK_OR_PORT"
elif ! [ -z $DB_HOSTNAME ] ; then
EXTRA=" --host=$DB_HOSTNAME --protocol=tcp"
fi
fi
# create database
if ! mysql -u"$DB_USER" --password="$DB_PASS" -e "use $DB_NAME"$EXTRA; then
mysqladmin CREATE $DB_NAME --user="$DB_USER" --password="$DB_PASS"$EXTRA;
fi
}
install_wp
install_gravity_forms
install_test_suite
install_db

View File

@@ -0,0 +1,25 @@
<?php
$_tests_dir = getenv( 'WP_TESTS_DIR' );
if ( ! $_tests_dir ) {
$_tests_dir = dirname( dirname( __FILE__ ) ) . '/tmp/wordpress-tests-lib';
}
require_once $_tests_dir . '/includes/functions.php';
function _manually_load_plugin() {
if ( ! class_exists( 'RGForms' ) ) {
require dirname( dirname( __FILE__ ) ) . '/tmp/gravityforms/gravityforms.php';
}
require dirname( dirname( __FILE__ ) ) . '/gravityflow.php';
//GFForms::setup( true );
gf_upgrade()->install();
GFForms::loaded();
gravity_flow()->setup();
}
tests_add_filter( 'muplugins_loaded', '_manually_load_plugin' );
require $_tests_dir . '/includes/bootstrap.php';
require dirname( __FILE__ ) . '/gravityforms-factory.php';
require dirname( __FILE__ ) . '/gravityforms-testcase.php';

View File

@@ -0,0 +1,39 @@
{
"is_starred" : 0,
"is_read" : 1,
"ip" : "::1",
"source_url" : "http:\/\/localhost\/wp2\/?gf_page=preview&id=24",
"post_id" : null,
"currency" : "USD",
"payment_status" : null,
"payment_date" : null,
"transaction_id" : null,
"payment_amount" : null,
"is_fulfilled" : null,
"created_by" : "1",
"transaction_type": null,
"user_agent" : "Mozilla\/5.0 (Macintosh; Intel Mac OS X 10.8; rv:23.0) Gecko\/20100101 Firefox\/23.0",
"status" : "active",
"1" : "Second Choice",
"2.1" : "First Choice",
"2.3" : "Third Choice",
"4" : "First Choice",
"5" : "bla",
"6" : "bla bla bla",
"7" : "First Choice",
"8" : "876",
"9" : "Second Choice",
"10" : "2003-03-03",
"11" : "03:03 am",
"12" : "(123)123-1235",
"13.1" : "c\/ Leon XIII",
"13.3" : "Malaga",
"13.4" : "Malaga",
"13.5" : "23000",
"13.6" : "Spain",
"14" : "http:\/\/apple.com",
"15" : "a:4:{i:0;s:4:\"ipad\";i:1;s:4:\"ipod\";i:2;s:4:\"imac\";i:3;s:6:\"iphone\";}",
"2.2" : "",
"3" : "",
"13.2" : ""
}

View File

@@ -0,0 +1,302 @@
<?php
class GF_UnitTest_Factory {
/**
* @var GF_UnitTest_Factory_For_Form
*/
public $form;
/**
* @var GF_UnitTest_Factory_For_Entry
*/
public $entry;
public $form_filename;
function __construct( $form_filename = "" ) {
$this->form = new GF_UnitTest_Factory_For_Form( $this );
$this->entry = new GF_UnitTest_Factory_For_Entry( $this );
}
}
class GF_UnitTest_Factory_For_Form extends GF_UnitTest_Factory_For_Thing {
function __construct( $factory = null ) {
parent::__construct( $factory );
$filename = $this->factory->form_filename;
if ( empty( $filename ) ) {
$filename = "standard.json";
}
$form_json = file_get_contents( dirname( __FILE__ ) . "/data/forms/" . $filename );
$forms = json_decode( $form_json, true );
$form = $forms[0];
$this->default_generation_definitions = $form;
}
function load_form( $filename ) {
}
function create_object( $form ) {
return GFAPI::add_form( $form );
}
function update_object( $form_id, $form ) {
$form['id'] = $form_id;
return GFAPI::update_form( $form );
}
function get_object_by_id( $form_id ) {
GFFormsModel::flush_current_forms();
return GFAPI::get_form( $form_id );
}
function get_form_by_id( $form_id ) {
return $this->get_object_by_id( $form_id );
}
}
class GF_UnitTest_Factory_For_Entry extends GF_UnitTest_Factory_For_Thing {
function __construct( $factory = null ) {
parent::__construct( $factory );
$this->default_generation_definitions = array();
}
function generate_random_entry_object( $form ) {
$fields = $form["fields"];
foreach ( $fields as $field ) {
/* @var GF_Field $field */
$type = GFFormsModel::get_input_type( $field );
if ( in_array( $type, array( "html", "page", "section" ) ) ) {
continue;
}
$inputs = $field->get_entry_inputs();
if ( is_array( $inputs ) ) {
foreach ( $inputs as $index => $input ) {
$entry[ (string) $input["id"] ] = isset( $field["choices"] ) && is_array($field["choices"]) ? $field["choices"][ $index ]["value"] : $this->_get_random_value( $field );
}
} else {
$entry[ (string) $field["id"] ] = $this->_get_random_value( $field );
}
}
return $entry;
}
function create_many_random( $count, $form_id ) {
$form = $this->factory->form->get_form_by_id( $form_id );
$results = array();
for ( $i = 0; $i < $count; $i ++ ) {
$entry = $this->generate_random_entry_object( $form );
$entry["form_id"] = $form_id;
$results[] = $this->create( $entry );
}
return $results;
}
function create_object( $entry ) {
return GFAPI::add_entry( $entry );
}
function update_object( $entry_id, $entry ) {
$entry['id'] = $entry_id;
return GFAPI::update_entry( $entry );
}
function get_object_by_id( $entry_id ) {
return GFAPI::get_entry( $entry_id );
}
function get_entry_by_id( $entry_id ) {
return $this->get_object_by_id( $entry_id );
}
private function _get_random_value( $field ) {
$type = GFFormsModel::get_input_type( $field );
switch ( $type ) {
case "number" :
$value = rand( 0, 10 );
break;
case "date" :
$value = date( 'Y-m-d', strtotime( '+' . mt_rand( 0, 30 ) . ' days' ) );
break;
case "time" :
$ampm = array( "am", "pm" );
$value = sprintf( "%02d:%02d %s", rand( 1, 12 ), rand( 1, 60 ), $ampm[ array_rand( $ampm ) ] );
break;
case "list" :
$value = serialize( array( "testvalue" . uniqid(), "testvalue" . uniqid(), "testvalue" . uniqid() ) );
break;
case "website" :
$value = "http://website" . uniqid() . ".com";
break;
case "phone" :
$value = sprintf( "(%03d)%03d-%04d", rand( 1, 999 ), rand( 1, 999 ), rand( 1, 9999 ) );
break;
default :
$value = "testvalue" . uniqid();
}
return $value;
}
}
abstract class GF_UnitTest_Factory_For_Thing {
var $default_generation_definitions;
/**
* @var GF_UnitTest_Factory
*/
var $factory;
/**
* Creates a new factory, which will create objects of a specific Thing
*
* @param object $factory Global factory that can be used to create other objects on the system
* @param array $default_generation_definitions Defines what default values should the properties of the object have. The default values
* can be generators -- an object with next() method. There are some default generators: {@link WP_UnitTest_Generator_Sequence},
* {@link WP_UnitTest_Generator_Locale_Name}, {@link WP_UnitTest_Factory_Callback_After_Create}.
*/
function __construct( $factory, $default_generation_definitions = array() ) {
$this->factory = $factory;
$this->default_generation_definitions = $default_generation_definitions;
}
abstract function create_object( $args );
abstract function update_object( $object, $fields );
function create( $args = array(), $generation_definitions = null ) {
if ( is_null( $generation_definitions ) ) {
$generation_definitions = $this->default_generation_definitions;
}
$generated_args = $this->generate_args( $args, $generation_definitions, $callbacks );
$created = $this->create_object( $generated_args );
if ( ! $created || is_wp_error( $created ) ) {
return $created;
}
if ( $callbacks ) {
$updated_fields = $this->apply_callbacks( $callbacks, $created );
$save_result = $this->update_object( $created, $updated_fields );
if ( ! $save_result || is_wp_error( $save_result ) ) {
return $save_result;
}
}
return $created;
}
function create_and_get( $args = array(), $generation_definitions = null ) {
$object_id = $this->create( $args, $generation_definitions );
return $this->get_object_by_id( $object_id );
}
abstract function get_object_by_id( $object_id );
function create_many( $count, $args = array(), $generation_definitions = null ) {
$results = array();
for ( $i = 0; $i < $count; $i ++ ) {
$results[] = $this->create( $args, $generation_definitions );
}
return $results;
}
function generate_args( $args = array(), $generation_definitions = null, &$callbacks = null ) {
$callbacks = array();
if ( is_null( $generation_definitions ) ) {
$generation_definitions = $this->default_generation_definitions;
}
foreach ( array_keys( $generation_definitions ) as $field_name ) {
if ( ! isset( $args[ $field_name ] ) ) {
$generator = $generation_definitions[ $field_name ];
if ( is_scalar( $generator ) ) {
$args[ $field_name ] = $generator;
} elseif ( is_object( $generator ) && method_exists( $generator, 'call' ) ) {
$callbacks[ $field_name ] = $generator;
} elseif ( is_object( $generator ) ) {
$args[ $field_name ] = $generator->next();
} else {
$args[ $field_name ] = $generator;
}
}
}
return $args;
}
function apply_callbacks( $callbacks, $created ) {
$updated_fields = array();
foreach ( $callbacks as $field_name => $generator ) {
$updated_fields[ $field_name ] = $generator->call( $created );
}
return $updated_fields;
}
function callback( $function ) {
return new WP_UnitTest_Factory_Callback_After_Create( $function );
}
function addslashes_deep( $value ) {
if ( is_array( $value ) ) {
$value = array_map( array( $this, 'addslashes_deep' ), $value );
} elseif ( is_object( $value ) ) {
$vars = get_object_vars( $value );
foreach ( $vars as $key => $data ) {
$value->{$key} = $this->addslashes_deep( $data );
}
} elseif ( is_string( $value ) ) {
$value = addslashes( $value );
}
return $value;
}
}
class GF_UnitTest_Generator_Sequence {
var $next;
var $template_string;
function __construct( $template_string = '%s', $start = 1 ) {
$this->next = $start;
$this->template_string = $template_string;
}
function next() {
$generated = sprintf( $this->template_string, $this->next );
$this->next ++;
return $generated;
}
}
class GF_UnitTest_Factory_Callback_After_Create {
var $callback;
function __construct( $callback ) {
$this->callback = $callback;
}
function call( $object ) {
return call_user_func( $this->callback, $object );
}
}

View File

@@ -0,0 +1,343 @@
<?php
require_once dirname( __FILE__ ) . '/gravityforms-factory.php';
class GF_UnitTestCase extends PHPUnit_Framework_TestCase {
protected static $forced_tickets = array();
protected $expected_deprecated = array();
protected $caught_deprecated = array();
/**
* @var GF_UnitTest_Factory
*/
protected $factory;
function setUp() {
set_time_limit( 0 );
global $wpdb;
$wpdb->suppress_errors = false;
$wpdb->show_errors = true;
$wpdb->db_connect();
ini_set( 'display_errors', 1 );
$this->factory = new GF_UnitTest_Factory;
$this->clean_up_global_scope();
$this->start_transaction();
$this->expectDeprecated();
add_filter( 'wp_die_handler', array(
$this,
'get_wp_die_handler'
) );
}
function tearDown() {
global $wpdb;
$this->expectedDeprecated();
$wpdb->query( 'ROLLBACK' );
remove_filter( 'dbdelta_create_queries', array(
$this,
'_create_temporary_tables'
) );
remove_filter( 'query', array(
$this,
'_drop_temporary_tables'
) );
remove_filter( 'wp_die_handler', array(
$this,
'get_wp_die_handler'
) );
}
function clean_up_global_scope() {
$_GET = array();
$_POST = array();
$this->flush_cache();
}
function flush_cache() {
global $wp_object_cache;
$wp_object_cache->group_ops = array();
$wp_object_cache->stats = array();
$wp_object_cache->memcache_debug = array();
$wp_object_cache->cache = array();
if ( method_exists( $wp_object_cache, '__remoteset' ) ) {
$wp_object_cache->__remoteset();
}
wp_cache_flush();
wp_cache_add_global_groups( array(
'users',
'userlogins',
'usermeta',
'user_meta',
'site-transient',
'site-options',
'site-lookup',
'blog-lookup',
'blog-details',
'rss',
'global-posts',
'blog-id-cache'
) );
wp_cache_add_non_persistent_groups( array(
'comment',
'counts',
'plugins'
) );
}
function start_transaction() {
global $wpdb;
$wpdb->query( 'SET autocommit = 0;' );
$wpdb->query( 'START TRANSACTION;' );
add_filter( 'dbdelta_create_queries', array(
$this,
'_create_temporary_tables'
) );
add_filter( 'query', array(
$this,
'_drop_temporary_tables'
) );
}
function _create_temporary_tables( $queries ) {
return str_replace( 'CREATE TABLE', 'CREATE TEMPORARY TABLE', $queries );
}
function _drop_temporary_tables( $query ) {
if ( 'DROP TABLE' === substr( $query, 0, 10 ) ) {
return 'DROP TEMPORARY TABLE ' . substr( $query, 10 );
}
return $query;
}
function get_wp_die_handler( $handler ) {
return array(
$this,
'wp_die_handler'
);
}
function wp_die_handler( $message ) {
throw new WPDieException( $message );
}
function expectDeprecated() {
$annotations = $this->getAnnotations();
foreach (
array(
'class',
'method'
) as $depth
) {
if ( ! empty( $annotations[ $depth ]['expectedDeprecated'] ) ) {
$this->expected_deprecated = array_merge( $this->expected_deprecated, $annotations[ $depth ]['expectedDeprecated'] );
}
}
add_action( 'deprecated_function_run', array(
$this,
'deprecated_function_run'
) );
add_action( 'deprecated_argument_run', array(
$this,
'deprecated_function_run'
) );
add_action( 'deprecated_function_trigger_error', '__return_false' );
add_action( 'deprecated_argument_trigger_error', '__return_false' );
}
function expectedDeprecated() {
$not_caught_deprecated = array_diff( $this->expected_deprecated, $this->caught_deprecated );
foreach ( $not_caught_deprecated as $not_caught ) {
$this->fail( "Failed to assert that $not_caught triggered a deprecated notice" );
}
$unexpected_deprecated = array_diff( $this->caught_deprecated, $this->expected_deprecated );
foreach ( $unexpected_deprecated as $unexpected ) {
$this->fail( "Unexpected deprecated notice for $unexpected" );
}
}
function deprecated_function_run( $function ) {
if ( ! in_array( $function, $this->caught_deprecated ) ) {
$this->caught_deprecated[] = $function;
}
}
function assertWPError( $actual, $message = '' ) {
$this->assertInstanceOf( 'WP_Error', $actual, $message );
}
function assertEqualFields( $object, $fields ) {
foreach ( $fields as $field_name => $field_value ) {
if ( $object->$field_name != $field_value ) {
$this->fail();
}
}
}
function assertDiscardWhitespace( $expected, $actual ) {
$this->assertEquals( preg_replace( '/\s*/', '', $expected ), preg_replace( '/\s*/', '', $actual ) );
}
function assertEqualSets( $expected, $actual ) {
$this->assertEquals( array(), array_diff( $expected, $actual ) );
$this->assertEquals( array(), array_diff( $actual, $expected ) );
}
function go_to( $url ) {
// note: the WP and WP_Query classes like to silently fetch parameters
// from all over the place (globals, GET, etc), which makes it tricky
// to run them more than once without very carefully clearing everything
$_GET = $_POST = array();
foreach (
array(
'query_string',
'id',
'postdata',
'authordata',
'day',
'currentmonth',
'page',
'pages',
'multipage',
'more',
'numpages',
'pagenow'
) as $v
) {
if ( isset( $GLOBALS[ $v ] ) ) {
unset( $GLOBALS[ $v ] );
}
}
$parts = parse_url( $url );
if ( isset( $parts['scheme'] ) ) {
$req = $parts['path'];
if ( isset( $parts['query'] ) ) {
$req .= '?' . $parts['query'];
// parse the url query vars into $_GET
parse_str( $parts['query'], $_GET );
}
} else {
$req = $url;
}
if ( ! isset( $parts['query'] ) ) {
$parts['query'] = '';
}
$_SERVER['REQUEST_URI'] = $req;
unset( $_SERVER['PATH_INFO'] );
$this->flush_cache();
unset( $GLOBALS['wp_query'], $GLOBALS['wp_the_query'] );
$GLOBALS['wp_the_query'] = new WP_Query();
$GLOBALS['wp_query'] = $GLOBALS['wp_the_query'];
$GLOBALS['wp'] = new WP();
// clean out globals to stop them polluting wp and wp_query
foreach ( $GLOBALS['wp']->public_query_vars as $v ) {
unset( $GLOBALS[ $v ] );
}
foreach ( $GLOBALS['wp']->private_query_vars as $v ) {
unset( $GLOBALS[ $v ] );
}
$GLOBALS['wp']->main( $parts['query'] );
}
protected function checkRequirements() {
parent::checkRequirements();
if ( WP_TESTS_FORCE_KNOWN_BUGS ) {
return;
}
$tickets = PHPUnit_Util_Test::getTickets( get_class( $this ), $this->getName( false ) );
foreach ( $tickets as $ticket ) {
if ( is_numeric( $ticket ) ) {
$this->knownWPBug( $ticket );
} elseif ( 'UT' == substr( $ticket, 0, 2 ) ) {
$ticket = substr( $ticket, 2 );
if ( $ticket && is_numeric( $ticket ) ) {
$this->knownUTBug( $ticket );
}
} elseif ( 'Plugin' == substr( $ticket, 0, 6 ) ) {
$ticket = substr( $ticket, 6 );
if ( $ticket && is_numeric( $ticket ) ) {
$this->knownPluginBug( $ticket );
}
}
}
}
/**
* Skips the current test if there is an open WordPress ticket with id $ticket_id
*/
function knownWPBug( $ticket_id ) {
if ( WP_TESTS_FORCE_KNOWN_BUGS || in_array( $ticket_id, self::$forced_tickets ) ) {
return;
}
if ( ! TracTickets::isTracTicketClosed( 'http://core.trac.wordpress.org', $ticket_id ) ) {
$this->markTestSkipped( sprintf( 'WordPress Ticket #%d is not fixed', $ticket_id ) );
}
}
/**
* Skips the current test if there is an open unit tests ticket with id $ticket_id
*/
function knownUTBug( $ticket_id ) {
if ( WP_TESTS_FORCE_KNOWN_BUGS || in_array( 'UT' . $ticket_id, self::$forced_tickets ) ) {
return;
}
if ( ! TracTickets::isTracTicketClosed( 'http://unit-tests.trac.wordpress.org', $ticket_id ) ) {
$this->markTestSkipped( sprintf( 'Unit Tests Ticket #%d is not fixed', $ticket_id ) );
}
}
/**
* Skips the current test if there is an open plugin ticket with id $ticket_id
*/
function knownPluginBug( $ticket_id ) {
if ( WP_TESTS_FORCE_KNOWN_BUGS || in_array( 'Plugin' . $ticket_id, self::$forced_tickets ) ) {
return;
}
if ( ! TracTickets::isTracTicketClosed( 'http://plugins.trac.wordpress.org', $ticket_id ) ) {
$this->markTestSkipped( sprintf( 'WordPress Plugin Ticket #%d is not fixed', $ticket_id ) );
}
}
public static function forceTicket( $ticket ) {
self::$forced_tickets[] = $ticket;
}
/**
* Define constants after including files.
*/
function prepareTemplate( Text_Template $template ) {
$template->setVar( array( 'constants' => '' ) );
$template->setVar( array( 'wp_constants' => PHPUnit_Util_GlobalState::getConstantsAsString() ) );
parent::prepareTemplate( $template );
}
/**
* Returns the name of a temporary file
*/
function temp_filename() {
$tmp_dir = '';
$dirs = array(
'TMP',
'TMPDIR',
'TEMP'
);
foreach ( $dirs as $dir ) {
if ( isset( $_ENV[ $dir ] ) && ! empty( $_ENV[ $dir ] ) ) {
$tmp_dir = $dir;
break;
}
}
if ( empty( $tmp_dir ) ) {
$tmp_dir = '/tmp';
}
$tmp_dir = realpath( $dir );
return tempnam( $tmp_dir, 'wpunit' );
}
}

View File

@@ -0,0 +1,609 @@
<?php
/**
* Testing the Gravity Flow API Functions.
*
* Note: all the database operations are wrapped in a transaction and rolled back at teh end of each test.
* So when debugging it's best not to stop the execution completely - best to let the tests run till the end.
* This also means that if you check the database directly in the middle of debugging a test you won't see any changes - it'll appear empty.
*
* @group testsuite
*/
class Tests_Gravity_Flow_API extends GF_UnitTestCase {
/**
* @var GF_UnitTest_Factory
*/
protected $factory;
/**
* @var int
*/
protected $form_id;
/**
* @var Gravity_Flow_API
*/
protected $api;
function setUp() {
parent::setUp();
$this->form_id = $this->factory->form->create();
$this->api = new Gravity_Flow_API( $this->form_id );
}
function tearDown() {
parent::tearDown();
}
function test_approval_process(){
$step1_id = $this->_add_approval_step();
$settings['step_name'] = 'Approval 2';
$settings['destination_rejected'] = $step1_id;
$step2_id = $this->_add_approval_step( $settings );
$steps = $this->api->get_steps();
$count_steps = count( $steps );
$this->assertEquals( 2, $count_steps );
$this->_create_entries();
$entries = GFAPI::get_entries( $this->form_id );
$entry = $entries[0];
$entry_id = $entry['id'];
// Refresh entry
$entry = GFAPI::get_entry( $entry_id );
// Check status
$status = $this->api->get_status( $entry );
$this->assertEquals( 'pending', $status );
// Approve
$step1 = $this->api->get_step( $step1_id, $entry );
$step1->update_user_status( 1, 'approved' );
$this->api->process_workflow( $entry_id );
// Refresh entry
$entry = GFAPI::get_entry( $entry_id );
// Check workflow has moved to next step
$current_step = $this->api->get_current_step( $entry );
$this->assertEquals( $step2_id, $current_step->get_id() );
// Reject step 2
$step2 = $this->api->get_step( $step2_id, $entry );
$step2->update_user_status( 1, 'rejected' );
$this->api->process_workflow( $entry_id );
// Refresh entry
$entry = GFAPI::get_entry( $entry_id );
// Check workflow has moved to first step
$current_step = $this->api->get_current_step( $entry );
$this->assertEquals( $step1_id, $current_step->get_id() );
// Approve Step 1
$step1 = $this->api->get_step( $step1_id, $entry );
$step1->update_user_status( 1, 'approved' );
$this->api->process_workflow( $entry_id );
// Approve step 2
$step2 = $this->api->get_step( $step2_id, $entry );
$step2->update_user_status( 1, 'approved' );
$this->api->process_workflow( $entry_id );
// Refresh entry
$entry = GFAPI::get_entry( $entry_id );
// Check workflow has finished
$current_step = $this->api->get_current_step( $entry );
$this->assertEquals( false, $current_step );
$final_status = $this->api->get_status( $entry );
$this->assertEquals( 'approved', $final_status );
}
function test_cancel_workflow() {
$step_id = $this->_add_approval_step();
$steps = $this->api->get_steps();
$count_steps = count( $steps );
$this->assertEquals( 1, $count_steps );
$this->_create_entries();
$entries = GFAPI::get_entries( $this->form_id );
$entry = $entries[0];
$entry_id = $entry['id'];
// Refresh entry
$entry = GFAPI::get_entry( $entry_id );
// Check status
$status = $this->api->get_status( $entry );
$this->assertEquals( 'pending', $status );
$this->api->cancel_workflow( $entry );
// Refresh entry
$entry = GFAPI::get_entry( $entry_id );
// Check status
$status = $this->api->get_status( $entry );
$this->assertEquals( 'cancelled', $status );
}
function test_restart_workflow() {
$step_id = $this->_add_approval_step();
$steps = $this->api->get_steps();
$count_steps = count( $steps );
$this->assertEquals( 1, $count_steps );
$this->_create_entries();
$entries = GFAPI::get_entries( $this->form_id );
$entry = $entries[0];
$entry_id = $entry['id'];
// Refresh entry
$entry = GFAPI::get_entry( $entry_id );
// Check status
$status = $this->api->get_status( $entry );
$this->assertEquals( 'pending', $status );
// Approve
$step = $this->api->get_step( $step_id, $entry );
$assignees = $step->get_assignees();
$this->assertEquals( 1, count( $assignees ) );
$assignees[0]->update_status( 'approved' );
$this->api->process_workflow( $entry_id );
// Refresh entry
$entry = GFAPI::get_entry( $entry_id );
// Check status
$status = $this->api->get_status( $entry );
$this->assertEquals( 'approved', $status );
$this->api->restart_workflow( $entry );
// Refresh entry
$entry = GFAPI::get_entry( $entry_id );
// Check status
$status = $this->api->get_status( $entry );
$this->assertEquals( 'pending', $status );
}
function test_restart_step() {
$step_id = $this->_add_approval_step();
$step2_id = $this->_add_approval_step();
$steps = $this->api->get_steps();
$count_steps = count( $steps );
$this->assertEquals( 2, $count_steps );
$this->_create_entries();
$entries = GFAPI::get_entries( $this->form_id );
$entry = $entries[0];
$entry_id = $entry['id'];
// Refresh entry
$entry = GFAPI::get_entry( $entry_id );
// Check status
$status = $this->api->get_status( $entry );
$this->assertEquals( 'pending', $status );
// Approve
$step = $this->api->get_step( $step_id, $entry );
$assignees = $step->get_assignees();
$this->assertEquals( 1, count( $assignees ) );
$assignees[0]->update_status( 'approved' );
$this->api->process_workflow( $entry_id );
// Refresh entry
$entry = GFAPI::get_entry( $entry_id );
$current_step = $this->api->get_current_step( $entry );
$this->assertEquals( $step2_id, $current_step->get_id() );
// Check status
$status = $this->api->get_status( $entry );
$this->assertEquals( 'pending', $status );
$this->api->restart_step( $entry );
// Refresh entry
$entry = GFAPI::get_entry( $entry_id );
// Check status
$status = $this->api->get_status( $entry );
$this->assertEquals( 'pending', $status );
$current_step = $this->api->get_current_step( $entry );
$this->assertEquals( $step2_id, $current_step->get_id() );
}
function test_send_to_step() {
$step1_id = $this->_add_approval_step();
$step2_id = $this->_add_approval_step();
$steps = $this->api->get_steps();
$count_steps = count( $steps );
$this->assertEquals( 2, $count_steps );
$this->_create_entries();
$entries = GFAPI::get_entries( $this->form_id );
$entry = $entries[0];
$entry_id = $entry['id'];
// Refresh entry
$entry = GFAPI::get_entry( $entry_id );
// Check status
$status = $this->api->get_status( $entry );
$this->assertEquals( 'pending', $status );
// Approve
$step = $this->api->get_step( $step1_id, $entry );
$assignees = $step->get_assignees();
$this->assertEquals( 1, count( $assignees ) );
$assignees[0]->update_status( 'approved' );
$this->api->process_workflow( $entry_id );
// Refresh entry
$entry = GFAPI::get_entry( $entry_id );
$current_step = $this->api->get_current_step( $entry );
$this->assertEquals( $step2_id, $current_step->get_id() );
// Check status
$status = $this->api->get_status( $entry );
$this->assertEquals( 'pending', $status );
// Send back to first step
$this->api->send_to_step( $entry, $step1_id );
// Refresh entry
$entry = GFAPI::get_entry( $entry_id );
// Check status
$status = $this->api->get_status( $entry );
$this->assertEquals( 'pending', $status );
$current_step = $this->api->get_current_step( $entry );
$this->assertEquals( $step1_id, $current_step->get_id() );
$step2 = $this->api->get_step( $step2_id, $entry );
$this->assertEquals( 'cancelled', $step2->get_status() );
}
function test_user_input_process() {
$step1_id = $this->_add_user_input_step();
$settings['step_name'] = 'User Input 2';
$step2_id = $this->_add_user_input_step( $settings );
$steps = $this->api->get_steps();
$count_steps = count( $steps );
$this->assertEquals( 2, $count_steps );
$this->_create_entries();
$entries = GFAPI::get_entries( $this->form_id );
$entry = $entries[0];
$entry_id = $entry['id'];
// Start workflow
$this->api->process_workflow( $entry_id );
// Refresh entry
$entry = GFAPI::get_entry( $entry_id );
// Check status
$status = $this->api->get_status( $entry );
$this->assertEquals( 'pending', $status );
// Complete
$step1 = $this->api->get_step( $step1_id, $entry );
$step1->update_user_status( 1, 'complete' );
$this->api->process_workflow( $entry_id );
// Refresh entry
$entry = GFAPI::get_entry( $entry_id );
// Check workflow has moved to next step
$current_step = $this->api->get_current_step( $entry );
$this->assertEquals( $step2_id, $current_step->get_id() );
// Complete step 2
$step2 = $this->api->get_step( $step2_id, $entry );
$step2->update_user_status( 1, 'complete' );
$this->api->process_workflow( $entry_id );
// Refresh entry
$entry = GFAPI::get_entry( $entry_id );
// Check workflow has finished
$current_step = $this->api->get_current_step( $entry );
$this->assertEquals( false, $current_step );
$final_status = $this->api->get_status( $entry );
$this->assertEquals( 'complete', $final_status );
}
function test_complex_process() {
$settings = array( 'destination_rejected' => 'next' );
$approval_step_1_id = $this->_add_approval_step( $settings );
$settings = array( 'destination_complete' => $approval_step_1_id );
$input_step_1_id = $this->_add_user_input_step( $settings );
$settings = array( 'destination_rejected' => $input_step_1_id );
$input_step_2_id = $this->_add_user_input_step( $settings );
$approval_step_1 = $this->api->get_step( $approval_step_1_id );
// Set destination approved to the input step 2 as we didn't have the ID before
$approval_step_1->destination_approved = $input_step_2_id;
gravity_flow()->update_feed_meta( $approval_step_1_id, $approval_step_1->get_feed_meta() );
// Add final approval step
$approval_step_2_id = $this->_add_approval_step();
$steps = $this->api->get_steps();
$count_steps = count( $steps );
$this->assertEquals( 4, $count_steps );
$this->_create_entries();
$entries = GFAPI::get_entries( $this->form_id );
$entry = $entries[0];
$entry_id = $entry['id'];
// Start workflow
$this->api->process_workflow( $entry_id );
// Refresh entry
$entry = GFAPI::get_entry( $entry_id );
// Check status
$status = $this->api->get_status( $entry );
$this->assertEquals( 'pending', $status );
// Reject entry
$approval_step_1 = $this->api->get_step( $approval_step_1_id, $entry );
$approval_step_1->update_user_status( 1, 'rejected' );
$this->api->process_workflow( $entry_id );
// Refresh entry
$entry = GFAPI::get_entry( $entry_id );
// Check workflow has moved to next step (input 1)
$current_step = $this->api->get_current_step( $entry );
$this->assertEquals( $input_step_1_id, $current_step->get_id() );
// Refresh entry
$entry = GFAPI::get_entry( $entry_id );
// Complete input step 1
$input_step_1 = $this->api->get_step( $input_step_1_id, $entry );
$input_step_1->update_user_status( 1, 'complete' );
$this->api->process_workflow( $entry_id );
// Refresh entry
$entry = GFAPI::get_entry( $entry_id );
// Check workflow has moved to next step (approval 1)
$current_step = $this->api->get_current_step( $entry );
$this->assertEquals( $approval_step_1_id, $current_step->get_id() );
// Reject entry again
$approva_step_1 = $this->api->get_step( $approval_step_1_id, $entry );
$approva_step_1->update_user_status( 1, 'rejected' );
$this->api->process_workflow( $entry_id );
// Refresh entry
$entry = GFAPI::get_entry( $entry_id );
// Check workflow has moved to next step (input 1)
$current_step = $this->api->get_current_step( $entry );
$this->assertEquals( $input_step_1_id, $current_step->get_id() );
// Complete input step 1
$input_step_1 = $this->api->get_step( $input_step_1_id, $entry );
$input_step_1->update_user_status( 1, 'complete' );
$this->api->process_workflow( $entry_id );
// Refresh entry
$entry = GFAPI::get_entry( $entry_id );
// Approve entry
$approva_step_1 = $this->api->get_step( $approval_step_1_id, $entry );
$approva_step_1->update_user_status( 1, 'approved' );
$this->api->process_workflow( $entry_id );
// Refresh entry
$entry = GFAPI::get_entry( $entry_id );
// Check workflow has moved to next step (input 2)
$current_step = $this->api->get_current_step( $entry );
$this->assertEquals( $input_step_2_id, $current_step->get_id() );
// Refresh entry
$entry = GFAPI::get_entry( $entry_id );
// Complete input step 2
$input_step_2 = $this->api->get_step( $input_step_2_id, $entry );
$input_step_2->update_user_status( 1, 'complete' );
$this->api->process_workflow( $entry_id );
// Refresh entry
$entry = GFAPI::get_entry( $entry_id );
// Check workflow has moved to next step (approval 2)
$current_step = $this->api->get_current_step( $entry );
$this->assertEquals( $approval_step_2_id, $current_step->get_id() );
// Refresh entry
$entry = GFAPI::get_entry( $entry_id );
// Approve entry
$approva_step_2 = $this->api->get_step( $approval_step_2_id, $entry );
$approva_step_2->update_user_status( 1, 'approved' );
$this->api->process_workflow( $entry_id );
// Refresh entry
$entry = GFAPI::get_entry( $entry_id );
// Check workflow has finished
$current_step = $this->api->get_current_step( $entry );
$this->assertEquals( false, $current_step );
$final_status = $this->api->get_status( $entry );
$this->assertEquals( 'approved', $final_status );
}
function test_assignee_field() {
$form = GFAPI::get_form( $this->form_id );
$assignee_field_properties_json = '{"type":"workflow_assignee_select","id":6,"label":"Assignee","adminLabel":"","isRequired":false,"size":"medium","errorMessage":"","inputs":null,"formId":93,"pageNumber":1,"choices":"","conditionalLogic":"","displayOnly":"","labelPlacement":"","descriptionPlacement":"","subLabelPlacement":"","placeholder":"","multipleFiles":false,"maxFiles":"","calculationFormula":"","calculationRounding":"","enableCalculation":"","disableQuantity":false,"displayAllCategories":false,"inputMask":false,"inputMaskValue":"","allowsPrepopulate":false,"gravityflowAssigneeFieldShowUsers":true,"gravityflowAssigneeFieldShowRoles":true,"gravityflowAssigneeFieldShowFields":true,"cssClass":""}';
$assignee_field_properties = json_decode( $assignee_field_properties_json, true );
$assignee_field_properties['id'] = 999;
$assignee_field = new Gravity_Flow_Field_Assignee_Select( $assignee_field_properties );
$form['fields'][] = $assignee_field;
GFAPI::update_form( $form );
$step_settings = array(
'assignees' => array( 'assignee_field|999' ),
);
$step1_id = $this->_add_user_input_step( $step_settings );
$entry_id = GFAPI::add_entry( array( 'form_id' => $this->form_id, 'date_created' => '2016-06-18 11:00', '1' => 'Second Choice', '2.2' => 'Second Choice', '8' => '1', '13.6' => 'Spain', 999 => 'user_id|1' ) );
$entry = GFAPI::get_entry( $entry_id );
$entry_id = $entry['id'];
$entry = GFAPI::get_entry( $entry_id );
// Check status
$status = $this->api->get_status( $entry );
$this->assertEquals( 'pending', $status );
// Complete
$step1 = $this->api->get_step( $step1_id, $entry );
$step1->update_user_status( 1, 'complete' );
$this->api->process_workflow( $entry_id );
// Refresh entry
$entry = GFAPI::get_entry( $entry_id );
// Check status
$status = $this->api->get_status( $entry );
$this->assertEquals( 'complete', $status );
}
function test_the_tests() {
$t = 1;
$this->assertEquals( 1, $t );
}
/* HELPERS */
function get_form_id() {
return $this->form_id;
}
function _create_entries() {
$form_id = $this->get_form_id();
$this->factory->entry->create_many( 10, array( 'form_id' => $form_id, 'date_created' => '2013-11-28 11:00', '1' => 'Second Choice', '2.2' => 'Second Choice', '8' => '1', '13.6' => 'Spain' ) );
$this->factory->entry->create_many( 10, array( 'form_id' => $form_id, 'date_created' => '2013-11-28 11:15', '1' => 'First Choice', '2.2' => 'Second Choice', '2.3' => 'Third Choice', '8' => '2', '13.6' => 'Brazil' ) );
$this->factory->entry->create_many( 10, array( 'form_id' => $form_id, 'date_created' => '2013-11-29 12:00', '1' => 'Second Choice', '2.1' => 'First Choice', '8' => '3', '13.6' => 'United Kingdom' ) );
$this->factory->entry->create_many( 10, array( 'form_id' => $form_id, 'date_created' => '2013-11-29 12:00', '1' => 'Second Choice', '2.1' => 'First Choice', '2.2' => 'Second Choice', '5' => 'My text', '8' => '4', '13.6' => 'United States' ) );
$this->factory->entry->create_many( 10, array( 'form_id' => $form_id, 'date_created' => '2013-11-29 13:00', '1' => 'Second Choice', '5' => 'Different text', '8' => '5', '13.6' => 'Canada' ) );
}
function _add_approval_step( $override_settings = array() ){
$default_settings = array(
'step_name' => 'Approval',
'description' => '',
'step_type' => 'approval',
'feed_condition_logic_conditional_logic' => false,
'feed_condition_conditional_logic_object' => array(),
'type' => 'select',
'assignees' => array( 'user_id|1' ),
'routing' => array(),
'unanimous_approval' => '',
'assignee_notification_enabled' => false,
'assignee_notification_message' => 'A new entry is pending your approval',
'destination_complete' => 'next',
'destination_rejected' => 'complete',
'destination_approved' => 'next',
);
$settings = wp_parse_args( $override_settings, $default_settings );
return $this->api->add_step( $settings );
}
function _add_user_input_step( $override_settings = array() ){
$default_settings = array(
'step_name' => 'User Input',
'description' => '',
'step_type' => 'user_input',
'feed_condition_logic_conditional_logic' => '0',
'feed_condition_conditional_logic_object' => array(),
'assignee_policy' => 'any',
'type' => 'select',
'assignees' => array( 'user_id|1' ),
'routing' => array(),
'assignee_notification_enabled' => '0',
'assignee_notification_message' => 'A new entry is pending your input',
'destination_complete' => 'next',
);
$settings = wp_parse_args( $override_settings, $default_settings );
return $this->api->add_step( $settings );
}
}

View File

@@ -0,0 +1,263 @@
<?php
/**
* Testing the Gravity Flow API Functions.
*
* Note: all the database operations are wrapped in a transaction and rolled back at teh end of each test.
* So when debugging it's best not to stop the execution completely - best to let the tests run till the end.
* This also means that if you check the database directly in the middle of debugging a test you won't see any changes - it'll appear empty.
*
* @group testsuite
*/
class Tests_Gravity_Flow_Webhooks extends GF_UnitTestCase {
/**
* @var GF_UnitTest_Factory
*/
protected $factory;
/**
* @var int
*/
protected $form_id;
/**
* @var Gravity_Flow_API
*/
protected $api;
function setUp() {
parent::setUp();
$this->form_id = $this->factory->form->create();
$this->api = new Gravity_Flow_API( $this->form_id );
}
function tearDown() {
parent::tearDown();
}
function test_webhook_process_200() {
$this->_create_webhook_test( '200', 'complete' );
}
function test_webhook_process_400() {
$this->_create_webhook_test( '400', 'error_client' );
}
function test_webhook_process_500() {
$this->_create_webhook_test( '500', 'error_server' );
}
function test_webhook_process_other() {
$this->_create_webhook_test( 'other', 'error' );
}
function test_the_tests() {
$t = 1;
$this->assertEquals( 1, $t );
}
/* HELPERS */
function get_form_id() {
return $this->form_id;
}
function _create_entries() {
$form_id = $this->get_form_id();
$this->factory->entry->create_many( 1, array(
'form_id' => $form_id,
'date_created' => '2013-11-28 11:00',
'1' => 'Second Choice',
'2.2' => 'Second Choice',
'8' => '1',
'13.6' => 'Spain',
));
}
function _add_approval_step( $override_settings = array() ) {
$default_settings = array(
'step_name' => 'Approval',
'description' => '',
'step_type' => 'approval',
'feed_condition_logic_conditional_logic' => false,
'feed_condition_conditional_logic_object' => array(),
'type' => 'select',
'assignees' => array( 'user_id|1' ),
'routing' => array(),
'unanimous_approval' => '',
'assignee_notification_enabled' => false,
'assignee_notification_message' => 'A new entry is pending your approval',
'destination_complete' => 'next',
'destination_rejected' => 'complete',
'destination_approved' => 'next',
);
$settings = wp_parse_args( $override_settings, $default_settings );
return $this->api->add_step( $settings );
}
function _add_webhook_step( $override_settings = array() ) {
$default_settings = array(
'step_name' => 'Webhook',
'description' => '',
'step_type' => 'webhook',
'feed_condition_logic_conditional_logic' => '0',
'feed_condition_conditional_logic_object' => array(),
'routing' => array(),
'destination_complete' => 'next',
'method' => 'post',
'authentication' => '',
'requestHeaders' => '',
'body' => 'select',
'format' => 'json',
'body_type' => 'all_fields',
'destination_complete' => 'next',
'destination_error-client' => 'next',
'destination_error-server' => 'next',
'destination_error' => 'next',
);
$settings = wp_parse_args( $override_settings, $default_settings );
return $this->api->add_step( $settings );
}
function _create_webhook_test( $response_code, $expected_status ) {
$settings = array();
$settings['step_name'] = 'Webhook - ' . $response_code;
$settings['url'] = 'http://unit-test-webhook.com/' . $response_code;
$webhook_step_1_id = $this->_add_webhook_step( $settings );
$settings = array();
$settings['step_name'] = 'Processing Issue';
$approval_step_2_id = $this->_add_approval_step( $settings );
$webhook_step_1 = $this->api->get_step( $webhook_step_1_id );
$approval_step_2 = $this->api->get_step( $approval_step_2_id );
switch ( $response_code ) :
case '200':
$webhook_step_1->destination_complete = 'complete';
$webhook_step_1->destination_error_client = $approval_step_2;
$webhook_step_1->destination_error_server = $approval_step_2;
$webhook_step_1->destination_error = $approval_step_2;
break;
case '400':
$webhook_step_1->destination_complete = $approval_step_2;
$webhook_step_1->destination_error_client = 'complete';
$webhook_step_1->destination_error_server = $approval_step_2;
$webhook_step_1->destination_error = $approval_step_2;
break;
case '500':
$webhook_step_1->destination_complete = $approval_step_2;
$webhook_step_1->destination_error_client = $approval_step_2;
$webhook_step_1->destination_error_server = 'complete';
$webhook_step_1->destination_error = $approval_step_2;
break;
case 'other':
$webhook_step_1->destination_complete = $approval_step_2;
$webhook_step_1->destination_error_client = $approval_step_2;
$webhook_step_1->destination_error_server = $approval_step_2;
$webhook_step_1->destination_error = 'complete';
break;
endswitch;
gravity_flow()->update_feed_meta( $webhook_step_1_id, $webhook_step_1->get_feed_meta() );
$steps = $this->api->get_steps();
$count_steps = count( $steps );
$this->assertEquals( 2, $count_steps );
$this->_create_entries();
$entries = GFAPI::get_entries( $this->form_id );
$entry = $entries[0];
$entry_id = $entry['id'];
// Refresh entry
$entry = GFAPI::get_entry( $entry_id );
// Check status
$workflow_status = $this->api->get_status( $entry );
$this->assertEquals( $expected_status, $workflow_status );
}
}
function webhook_response_test_results( $preempt, $request, $url ) {
if ( strpos( $url, 'unit-test-webhook.com' ) == false ) {
return false;
}
$url_pieces = explode( '/', $url );
switch ( end( $url_pieces ) ) :
case '200':
$response = array(
'headers' => array(),
'body' => '{"test":"202POST"}',
'response' => array(
'code' => 202,
'message' => 'Accepted',
),
'cookies' => array(),
'filename' => '',
);
break;
case '400':
$response = array(
'headers' => array(),
'body' => '{"test":"402POST"}',
'response' => array(
'code' => 402,
'message' => 'Payment Required',
),
'cookies' => array(),
'filename' => '',
);
break;
case '500':
$response = array(
'headers' => array(),
'body' => '{"test":"502POST"}',
'response' => array(
'code' => 502,
'message' => 'Bad Gateway',
),
'cookies' => array(),
'filename' => '',
);
break;
case 'other':
$response = array(
'headers' => array(),
'body' => '{"test":"OTHERPOST"}',
'response' => array(
'code' => 302,
'message' => 'Found',
),
'cookies' => array(),
'filename' => '',
);
break;
default:
$response = false;
endswitch;
return $response;
}
add_filter( 'pre_http_request', 'webhook_response_test_results', 10, 3 );