Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
{
    "response": {
		"forms": [{
			"form_type": "addresses",
			"fieldsform_content": [{
				"title": "Address",
				"fields": [{
					"key": "title",
					"title": "Title",
					"type": "text",
					"required": 1
				}, ...]
			}]
		},{
			"form_type": "contacts",
			"fieldsform_content" : [{
				... contact fields ...
			}],
		}]
	},
	"meta": { ... }
}

...

Code Block
languagebash
$ curl -XPOST /_forms/fields -d'{
	"forms": [{
		"form_type": "addresses",
		"form_config": { ... configure addresses form ... },
	}, {
		"form_type": "contacts"
	}]
}';

would return a similar structure of fields. The fields endpoint accepts the following parameters:

...

Code Block
languagebash
$ curl -XPOST /_forms -d '{
	"forms": [{ 
		"form_type": "addresses",
		"form_config": { ... }
		"form_data": {
			"title": "My new address",
			"link" : {
				"type": "company",
				"id": 100
			},
			...
		}
	},{
		"form_type": "contacts",
		"form_data": {
			"contact.firstname": "Kurt",
            "affiliation.email": "abc@example.com",
			...
		}
	}]
}';

...