Answered

Make questions required by default

  • 17 February 2023
  • 3 replies
  • 139 views

Userlevel 2
Badge +1

Is it possible to set the default for all new questions to be required? It’s tedious (and error-prone) to have to go through every question and click it. I appreciate that it’s not recommended, but the sort of recruitment surveys that we do are useless if they haven’t answered every question, so I’d rather be able to apply that as the default and turn off if needed.

icon

Best answer by jeremielp 17 February 2023, 21:08

View original

3 replies

Userlevel 5
Badge +5

I am not sure that you can do it with the user interface, but if not, you can do that with the Create API.


1. Retrieve forms with

GET https://api.typeform.com/forms

https://www.typeform.com/developers/create/reference/retrieve-form/

 

2. Retrieve each form with

GET https://api.typeform.com/forms/{form_id}

https://www.typeform.com/developers/create/reference/retrieve-form/

 

3. Check if one field is not required in the form

 

4. Update the form to mark the field as required with

PUT https://api.typeform.com/forms/{form_id}

https://www.typeform.com/developers/create/reference/update-form/

.

Userlevel 2
Badge +1

Thanks, but this is after the event isn’t it? It’s also a bit of a sledgehammer to crack a nut - it will set all to required, so one still has to go through the whole script and update any that aren’t.

Userlevel 5
Badge +5

Thanks, but this is after the event isn’t it?

No this is not after an event. This is a script that you would have to trigger on a regular basis using a CRON for example. I agree that it is not the easiest solution, but that is the only one that allows you to automate that.

Reply