When I try to PUT this following json to update user's custom field.
(this field is Term reference )
{
"current_pass": "123",
"field_class": {
"und": [
{
"tid": "4"
}
]
}
}
But it return:
{
"form_errors": {
"field_class][und": "An illegal choice has been detected. Please contact the site administrator."
}
}
I try to change the field in administrator interface, It works.
EDIT:
But when I try to post a Text Field:
{
"current_pass": "123",
"field_nick_name": {
"und": [
{
"value": "this is a test"
}
]
}
}
It success!
How to fix it?
Comments
Comment #1
TangMonk commentedComment #2
TangMonk commentedComment #3
TangMonk commentedComment #4
TangMonk commentedComment #5
TangMonk commentedFixed
Comment #6
TangMonk commentedComment #7
TangMonk commentedComment #9
TangMonk commentedThe above patch is wrong,
Comment #10
marcingy commentedYou need to provide the appropriate FAPI form structure for the field element in question.