Here we are:
- Using Multifield module
- Multifield is defined as Unlimited Number of values
- Using Services with REST server to update a node - adding a value in the list of Multifields
- Using Postman to PUT to update that node
- Content type name: test_multi
- Multifield field name: field_jarod_multi
- Multifield subfield name: field_jarod_note, Integer
Here's what the Multifield config looks like by default for jarod_multi:
Note the checkbox is on for "Hide blank items". So when editing a node we see this:
That's fine. If I want to add another, I just use the button and we're good.
BUT it doesn't work when adding another through web services. Doing a PUT will give me a return code of 200, but the value is never added.
To do that, uncheck the "Hide blank items" button which gives a view like this when editing a node:
Now in my web services I do a PUT:
The full value for the Key is
node[field_jarod_multi][und][2][field_jarod_note][und][0][value]
After the PUT, I get the new multifield value added to the node:
Lots of headaches over this one. I just missed the checkbox. So glad this one is solved.
No comments:
Post a Comment