...
forms
: The forms for each object type, with optional configuration options.submit
: The data you wish to submit for each type of form.
When working the input type "object" you're required to pass back a "type" and "id" of an existing object or "type" and "data", where "data" is an associative array of fields from that object's form. For example, the following will create a new company with a new address associated with it's physical address.
Code Block | ||
---|---|---|
| ||
$ curl -XPOST /_forms -d '{
"forms": [{
"form_type": "companies",
"form_config": { ... }
"form_data": {
"company.name" : "Kurt's sample company",
"company.website": "http://www.kurts-sample-company.com",
"company.physical_address" : {
"type": "address",
"data": {
"address.title" : "Kurt's sample address",
"company.street1": "24323 Kurt's Test Street",
"company.postcode": "2500",
...
}
},
...
}
}]
}'; |
The "data" attribute is only supported for object's that are supported by this forms feature.