Create a hidden form field via the REST API | Community
Skip to main content
Spenser_Fishel1
New Participant
October 1, 2016
Solved

Create a hidden form field via the REST API

  • October 1, 2016
  • 1 reply
  • 5852 views

I'm trying to add a field to a form via the REST API (this will eventually be done to hundreds of forms which is why I want to do it via the API) but I get a System Error when I try to set 'fieldType' to 'hidden'. When I run the 'Get Fields For Form' endpoint I see that 'dataType' is 'hidden' for the hidden fields, is the 'fieldType' declaration different (they seem to match on everything else)?

What I'm trying to run that is giving me the system error (personal data XX'd out).

Endpoint: ###-###-###.mktorest.com/rest/asset/v1/form/XXXX/fields.json

Post Payload: fieldId=myField__c&label=HiddenFieldLabel&fieldType=hidden&access_token=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX:XX

Also, is there any documentation on how to set the Autofill settings for hidden fields via the API?

Best answer by SanfordWhiteman

It's not you, it's the docs (which are not quite prime-time for these latest endpoints) and the server. This shouldn't cause an error.  I expect hidden hasn't been implemented correctly. Do you want to open a case, or should I?

1 reply

SanfordWhiteman
SanfordWhitemanAccepted solution
New Participant
October 2, 2016

It's not you, it's the docs (which are not quite prime-time for these latest endpoints) and the server. This shouldn't cause an error.  I expect hidden hasn't been implemented correctly. Do you want to open a case, or should I?

May 22, 2017

Sandy!!!!

How come every time I am looking for information on a question, you are somehow involved with the answer?????????

SanfordWhiteman
New Participant
May 22, 2017

Because I'm the knowitalliest know-it-all who ever knew it all?