json Gravity Wiz // Gravity Forms // JSON vs XML Export Format

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了json Gravity Wiz // Gravity Forms // JSON vs XML Export Format相关的知识,希望对你有一定的参考价值。

<?xml version="1.0" encoding="UTF-8"?>
<forms version="1.8.22.9">
	<form labelPlacement="top_label" useCurrentUserAsAuthor="1">
		<title><![CDATA[A Simple Form]]></title>
		<description><![CDATA[How much simpler is the form export format in Gravity Forms 1.9?]]></description>
		<descriptionPlacement><![CDATA[below]]></descriptionPlacement>
		<button type="text">
			<text><![CDATA[Submit]]></text>
		</button>
		<fields>
			<field type="name" id="1" size="medium" nameFormat="advanced">
				<label><![CDATA[Name]]></label>
				<inputs>
					<input id="1.2">
						<label><![CDATA[Prefix]]></label>
						<choices>
							<choice>
								<text><![CDATA[Mr.]]></text>
								<value><![CDATA[Mr.]]></value>
							</choice>
							<choice>
								<text><![CDATA[Mrs.]]></text>
								<value><![CDATA[Mrs.]]></value>
							</choice>
							<choice>
								<text><![CDATA[Miss]]></text>
								<value><![CDATA[Miss]]></value>
							</choice>
							<choice>
								<text><![CDATA[Ms.]]></text>
								<value><![CDATA[Ms.]]></value>
							</choice>
							<choice>
								<text><![CDATA[Dr.]]></text>
								<value><![CDATA[Dr.]]></value>
							</choice>
							<choice>
								<text><![CDATA[Prof.]]></text>
								<value><![CDATA[Prof.]]></value>
							</choice>
							<choice>
								<text><![CDATA[Rev.]]></text>
								<value><![CDATA[Rev.]]></value>
							</choice>
						</choices>
						<isHidden><![CDATA[1]]></isHidden>
						<inputType><![CDATA[radio]]></inputType>
					</input>
					<input id="1.3">
						<label><![CDATA[First]]></label>
					</input>
					<input id="1.4">
						<label><![CDATA[Middle]]></label>
						<isHidden><![CDATA[1]]></isHidden>
					</input>
					<input id="1.6">
						<label><![CDATA[Last]]></label>
					</input>
					<input id="1.8">
						<label><![CDATA[Suffix]]></label>
						<isHidden><![CDATA[1]]></isHidden>
					</input>
				</inputs>
			</field>
			<field type="email" id="2" size="medium">
				<label><![CDATA[Email]]></label>
			</field>
			<field type="textarea" id="3" size="medium">
				<label><![CDATA[Message]]></label>
			</field>
		</fields>
		<postContentTemplateEnabled><![CDATA[0]]></postContentTemplateEnabled>
		<postTitleTemplateEnabled><![CDATA[0]]></postTitleTemplateEnabled>
		<confirmations>
			<confirmation id="54cb94a913700" isDefault="1" type="message">
				<name><![CDATA[Default Confirmation]]></name>
				<message><![CDATA[Thanks for contacting us! We will get in touch with you shortly.]]></message>
			</confirmation>
		</confirmations>
		<notifications>
			<notification id="54cb94a913111">
				<to><![CDATA[{admin_email}]]></to>
				<name><![CDATA[Admin Notification]]></name>
				<event><![CDATA[form_submission]]></event>
				<toType><![CDATA[email]]></toType>
				<subject><![CDATA[New submission from {form_title}]]></subject>
				<message><![CDATA[{all_fields}]]></message>
				<isActive><![CDATA[0]]></isActive>
			</notification>
		</notifications>
	</form>
</forms>
{
    "0": {
        "title": "A Simple Form",
        "description": "How much simpler is the form export format in Gravity Forms 1.9?",
        "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": 723,
                "choices": "",
                "conditionalLogic": "",
                "inputType": ""
            },
            {
                "type": "email",
                "id": 2,
                "label": "Email",
                "adminLabel": "",
                "isRequired": false,
                "size": "medium",
                "errorMessage": "",
                "inputs": null,
                "formId": 723,
                "choices": "",
                "conditionalLogic": "",
                "inputType": ""
            },
            {
                "type": "textarea",
                "id": 3,
                "label": "Message",
                "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,
                "gwacEnable": false,
                "gp-unique-id_starting_number": "",
                "formId": 723,
                "choices": "",
                "conditionalLogic": "",
                "inputType": ""
            }
        ],
        "id": 723,
        "useCurrentUserAsAuthor": true,
        "postContentTemplateEnabled": false,
        "postTitleTemplateEnabled": false,
        "postTitleTemplate": "",
        "postContentTemplate": "",
        "lastPageButton": null,
        "pagination": null,
        "firstPageCssClass": null,
        "confirmations": [
            {
                "id": "54cb94a913700",
                "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": "54cb94a913111",
                "to": "{admin_email}",
                "name": "Admin Notification",
                "event": "form_submission",
                "toType": "email",
                "subject": "New submission from {form_title}",
                "message": "{all_fields}"
            }
        ]
    },
    "version": "1.9"
}

以上是关于json Gravity Wiz // Gravity Forms // JSON vs XML Export Format的主要内容,如果未能解决你的问题,请参考以下文章

php Gravity Wiz // Gravity Forms //按表单名称获取表单ID

php Gravity Wiz // Gravity Forms //添加日期合并标记的格式选项

php Gravity Wiz // Gravity Forms Coupons //允许零金额优惠券

php Gravity Wiz // Gravity Forms //用户注册//通过电子邮件更新

css Gravity Wiz // Gravity Forms // CSS // Hide AJAX Spinner

css Gravity Wiz // Gravity Forms // CSS // Hide AJAX Spinner