How to add a dynamic field to a Google form?

Is there a function Add a new field using jQuery or Add fields using Javascript in Google forms?

I am creating a questionnaire application using the google apps script, and questions and answers will be asked from my admin panel (the administrator decides how many questions will be there). It would be ideal if there was (+) next to the form to automatically load another text box below the form.

+4
source share
3 answers

I founded a great reason for this, why it cannot add dynamic fields to Google Forms, because Google Forms applications are completely linked to distribution sheets

All forms having separate tables are there.

Thus, it is not possible to create dynamic fields in Google forms due to the strong connection with the spreadsheet.

This can be said of the static relationship between Google Forms and tables.

+1
source

I think you want to create a new page that can be sent to a Google spreadsheet using jQuery with the JSON data API and the Google Spreadsheets Data API

+2
source

Short answer

Yes, you can create / edit a form programmatically using the form service Class Form

Note. Currently, it is not possible to make changes to the form / questions based on user input, for example, to create cascading drop-down lists.

Extended answer

The following are specific methods for adding each type of question to a Google form.

  Method Return type Brief description
 -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- ------------
 addCheckboxItem () CheckboxItem Appends a new question item that allows the respondent to select one or more checkboxes, as well as an optional "other" field.
 addDateItem () DateItem Appends a new question item that allows the respondent to indicate a date.
 addDateTimeItem () DateTimeItem Appends a new question item that allows the respondent to indicate a date and time.
 addDurationItem () DurationItem Appends a new question item that allows the respondent to indicate a length of time.
 addGridItem () GridItem Appends a new question item, presented as a grid of columns and rows, that allows the respondent to select one choice per row from a sequence of radio buttons.
 addListItem () ListItem Appends a new question item that allows the respondent to select one choice from a drop-down list.
 addMultipleChoiceItem () MultipleChoiceItem Appends a new question item that allows the respondent to select one choice from a list of radio buttons or an optional "other" field.
 addParagraphTextItem () ParagraphTextItem Appends a new question item that allows the respondent to enter a block of text.
 addScaleItem () ScaleItem Appends a new question item that allows the respondent to choose one option from a numbered sequence of radio buttons.
 addTextItem () TextItem Appends a new question item that allows the respondent to enter a single line of text.
 addTimeItem () TimeItem Appends a new question item that allows the respondent to indicate a time of day.

see also

0
source

All Articles