Autocomplete Google Form based on values in spreadsheet - google-apps-script

I'm writing a script to autocomplete some fields in a Google Form based on a field that has started to be filled out. For argument's sake, let's say it's address. So when a user fills the form out like so:
And if in a spreadsheet called defaults there is a row with this address:
Not only that field is updated, but any other fields that match are, too (like name and email).
Does anyone have any suggestions for me? My research has turned up nothing too useful for this case.

It's not possible to create an autocomplete field in a live Google Form. You can create a stand alone Apps Script Web App using HTML, CSS, and JavaScript. You could even style it to make it look like a Google Form.

Related

FILE_UPLOAD item type in Google Apps Script (GAS) for Form Submission

I've seen FILE_UPLOAD item type in google forms regarding this topic.
My problem is related, but somewhat different--perhaps someone can recommend a workaround?
Situation: Using Google Forms as content submission and editing tool for certain kinds of "documents," with a specific form for each document.
Objective: copy an original form submission to create through GAS a NEW form submission with the same item responses.
This is based on a response in the original form submission indicating that a variant also needs to be created based on the original content.
Example: Another form entry is needed where the original content is translated to a different language (with first draft using google translate and then revised by native speaker using the Google form). In other cases, only portions of a long original submission need to be revised to create the variant document, where the revisions are made to the duplicated submission in the Google form.
Things are fine except where the form(s) have image upload options and I need to copy the FILE_UPLOAD content of the original form response back into the new scripted form submission. But it appears required to specify the item type (e.g., .asTextItem(), .asCheckBoxItem(), etc.). But there is no .asFileUploadItem() option (I tried using it), and therefore an error is thrown, preventing the copy of FILE_UPLOAD content into the corresponding question item of the form. I've tried using .asTextItem(), since the G-Drive address is just a text string (at least in the paired Google Sheet), but the Form won't accept that. It seems (at least in our case) that the original file location would work for all variant duplicates that retain the same image, so copying the content (the G-Drive location of the image) should be fine, if GAS allowed me to do that.
Is there any workaround provided by Google, now that it is a year later than the previous post I found (above)? Has anyone come up with a workable solution that might work for my case?
Thanks so much for any help!

Is it possible to generate an autofill script for Google Forms?

I want to create a script to autofill based on what the respondent is filling out in a short answer or even just suggest text in a dropdown.
For example, there are over 300 different codes, which makes scrolling through that drop down list very annoying.
I want the script to had the ability to suggest an autofill once a user is attempting to type in an answer. For example, typing "T00F1..." would suggest autofilling the rest to "T00F17T0"
That way i prevent that the respondent write wrong the code
If it is not possible, what alternatives do you recommend to generate this type of forms?

Google Script: Using an input text box in a form that pulls items from the sheet and presents as options

I am currently developing a program in Google Script that works with Google Sheets. I've created a tab that serves as the UI and have multiple tabs for each data type to store the data.
When I first started, I originally reserved some cells on the UI tab that I used as the inputs for creating a parent-child relationship instance. To do this, I directly set validation on each of the cells and used the "List from a range" Criteria to provide the drop-down list to provide the options to select from.
Now, I am trying to move this input off of the cells in the UI tab and into the sidebar. I am now using HTML Service and am creating a form to handle this functionality. However, I can't figure out where to get started to provide the same drop-down functionality for each of the text inputs in the form as I had when I used the cell validation.
Does anyone know what syntax is used to do this?
Thank you,
Nicholas Kincaid
jQuery auto-complete combo-box is what will take care of this => jqueryui.com/resources/demos/autocomplete/combobox.html

Attach a google form to a google spreadsheet

I'd like to create a form by google script.
This is pretty easy but I'd like to attached this form to a spreadsheet (no only the response), like I would have created it by the UI.
Is that possible ? Given the Formclass or FormApp is doesn't seem so. Is there a way around ?
EDIT: My goal was to create the form with the script and having the same result as if the user had had the form created from the UI interface (the main difference being having the form menu in the SS UI). It's apparently not possible.
You're right - it's pretty easy once you have the trick. Use FormApp to get the published URL of the form, UrlFetch to grab its html, then the HtmlService to present the form in the spreadsheet's UI.
See Single Google Form for multiple Sheets.

How to make Google Form send out a confirmation email to the user who filled it out?

Is there any way to script a Google Form in a way that it automatically sends out an email with the form response summary to the user who filled it out?
The flow should be:
- A user fills out a Google Form embedded on a website, the form includes "email" field
- Every time this happens, Google Form sends an email to the respondent with a summary of his answers in the form.
There's a specific script to do what you're trying to do. It's called MCQ and it was created by Romain Villard. It's a little tricky to use, but I've figured it out and I'm using it on a regular basis. Email me at primeinstruction#gmail.com and I can help you to do it.
Joseph