We're working to add support to Custom Fields into the native iOS app and in my tests, I can't have Custom Fields and create a new user from the web.

Looks like the error happens because there's an invalid character. I did fix this issue in our docs (https://github.com/RocketChat/Rocket.Chat.Docs/pull/410) but I don't know exactly how to fix in the Admin docs, since that JSON is being used as a translated string (?).
I get this issue also on my default rocketchat instance in browser. Not just for IOS APP.
@maxpen Looks like the JSON is invalid when this error happens. Make sure you use some JSON linter to validate it and remove any invalid character: http://jsonlint.com.
After that, everything should work just fine.
@rafaelks Can you copy me a working example? I'm not so good with json and that tool just tells me SyntaxError: Bad string on line 1 and I have no idea what is wrong with line 1 :)
@maxpen The script on this pr file should be working https://github.com/RocketChat/Rocket.Chat.Docs/pull/410/files
@MartinSchoeler that works! When do we see this pr in the new release?
Also how do I display these custom values for other users or get them to show up in the admin panel for each user?
This issue has not fixed it: https://github.com/RocketChat/Rocket.Chat/pull/7688
I'm unable to get any customfields to show up in the UserInfo tab as well. I can see it when i go into My Account just not when I look at a users profile.
The problem is really annoying, it would be great if you could change the behavior like described from
@rafaelks
Tried again this today... took me many tries until I got it right. There's no kind of JSON validation on the field and copying it from the documentation doesn't work because of hidden characters.
In case anyone wants to try the documentation JSON, here's one working:
{
"role": {
"type": "select",
"defaultValue": "student",
"options": ["teacher", "student"],
"required": true,
"modifyRecordField": {
"array": true,
"field": "roles"
}
},
"twitter": {
"type": "text",
"required": true,
"minLength": 2,
"maxLength": 10
}
}
yeah, the documentation below it is useless to copy, it uses tabs which doesnt work
also in the i18n some people translated the field keys (i assume that wont work)
I experienced the same issue, I guess we should let RocketChat sanetize the JSON , by removing tabs
Most helpful comment
Tried again this today... took me many tries until I got it right. There's no kind of JSON validation on the field and copying it from the documentation doesn't work because of hidden characters.
In case anyone wants to try the documentation JSON, here's one working: