...
When working with 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 physical address associated with it's physical addresslinked to it.
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", ... } }, ... } }] }'; |
...