AnsweredAssumed Answered

Create a hidden form field via the REST API

Question asked by 7e46314e0caee141311b88c1f89ed09c12fbdba4 on Nov 27, 2017
Latest reply on Nov 30, 2017 by Sanford Whiteman

Following this tread I'm also trying to update forms with hidden field but I can't figure how to do it.

 

Can you guys please show POST example on how to do it.

 

We have a field which is called "formCategory"

 

POST Example

payload = {'id': 1638, 'addFormFieldSetRequest': {

  "fieldId": "formCategory",

  "fieldType": "hidden"

}}

r = requests.post('https://...mktorest.com/rest/asset/v1/form/1638/fields.json?access_token=...', params=payload)

 

Response:

{'success': False, 'errors': [{'message': 'fieldId cannot be null.', 'code': '701'}], 'requestId': None, 'warnings': []}

Outcomes