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

TangMonk’s picture

Title: Can not update user custom field. » Can not update user's custom Term reference field.
Issue summary: View changes
TangMonk’s picture

Issue summary: View changes
TangMonk’s picture

Status: Needs review » Active
TangMonk’s picture

Issue summary: View changes
TangMonk’s picture

StatusFileSize
new929 bytes

Fixed

TangMonk’s picture

Title: Can not update user's custom Term reference field. » Can not update custom Term taxonomy field.
Status: Active » Fixed
TangMonk’s picture

Status: Fixed » Reviewed & tested by the community

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 5: user_create-2198005-1.patch, failed testing.

TangMonk’s picture

StatusFileSize
new1.17 KB

The above patch is wrong,

marcingy’s picture

Category: Bug report » Support request
Status: Needs work » Fixed

You need to provide the appropriate FAPI form structure for the field element in question.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.