Answered

Is there a way to edit one of the answers object

  • 4 April 2022
  • 6 replies
  • 134 views

Userlevel 1

Is there a way to edit this field “ref” in the answers object so instead of having  "ref": "ef34b985c51e4131" could it be   "ref": "company_id" ? 

"answers": [
{
"type": "text",
"field": {
"id": "",
"type": "short_text",
"ref": "ef34b985c51e4131"
}
},
{
"type": "choice",
"choice": {
"label": ""
},
"field": {
"id": "",
"type": "multiple_choice",
"ref": "9aaaeeebe70858c4"
}
}
]
icon

Best answer by mathio 5 April 2022, 21:56

View original

6 replies

Userlevel 7
Badge +5

Hi @AaronMendez15 Happy Tuesday! Thanks for stopping by. 😀

I believe it’s only possible to edit the question references at the moment, but @mathio correct me if I’m wrong!

Userlevel 7
Badge +5

Hello @AaronMendez15 and @Liz , I dont think you can edit refs on answers.

However you can define hidden fields and pass a value to identify your respondent via URL or in embedded typeforms. Hidden field values are available in answers object.

Userlevel 1

Ohhh I see, also I made a mistake I thought it was the answer object, but in reality we want to edit the ref of the question object, so instead of this...

{ "id": "",

"ref": "ef34b951e4131",

"type": "short_text",

"title": "",

"properties": {} }

 

have this...

{ "id": "",

"ref": "company_id",

"type": "short_text",

"title": "",

"properties": {} }

Userlevel 7
Badge +5

Then I have some good news for you! You can change question refs when building your typeform, in the settings panel on the right.

Userlevel 1

Awesome, also I have a question, from the article you reference me too, it says to click the block reference, but I’m not able too 

do you know why? 🤔

Userlevel 7
Badge +5

I am not 100% sure, but it might be due to the fact that you already collected some responses. If you edit refs you might lose your responses data. Try copying your typeform to start with a new one.

Reply