Grab current selection from a google form section - google-apps-script

I have a google calendar that lists multiple free classes that are available each month. Currently the way people sign up is that they click on a link to a google doc and enter their names, but a blank work doc with names isn't very professional. Instead I'm created a google form that will send the responses to an excel spreadsheet, but need some help.
Currently the form first question asks "what date is the class you'd like to addend?" - Is there any way I can get the users response to that first question without having them submit the form?
Essentially I'd like for them to enter the date and use the getEventsForDay(date) function to create the second question dynamically populated with the calsses for the date they selected. Then have them choose the class with radio buttons. Is there any way to do this or would I have to have them select a date and then from that submit spawn a new on the fly form that then would list the classes for the date they selected?

For what I know you can't do that in a single form. You will need to do it with 2 forms. You can prefill the other form with some informations of the first form to make the bond.
But the best solution is: not to use the Google Forms and build your own form in apps script. Here an example and the code here.

Related

Can I use a user-entered text value in one section of a Google Form to populate checkbox options in the next section?

I'm trying to figure out if this is possible and if so any help on how to make it happen would be amazing. If not, I'd love to get an idea why it's not possible. I'm a novice and looking to learn! :)
I want to take a text response to one question in the first section of a Google Form and use that to populate checkbox options from a Google Sheet in the next section.
Basically, people check equipment out from my office for use with students and they can submit the form for extensions. I sometimes get confusing responses and would like to give them checkbox options based off the students' ID they enter in the first question.
Is any response information even available to use before the form is submitted?

Use button in Google Sheets to open the pre-filled Google Form from dynamic hyperlink

Issue:
I have a Google Form, let's call it "Stock". The form simply records new entries of stock into the Google Sheet "Stock Form Responses". In this sheet, there is a field called Stock Number which has to be unique. In order to cut out human error in the process of assigning a new stock number to the rows of data added through the form, I have created a very simple formula in a cell:
=max('Stock Form Responses'!B:B)+1
This does exactly what I need it to do, and tells me the latest stock number, and adds one to it, ready for the next addition via the form. I then use this code in another cell (G9 of the sheet called "Control"), to pass that number to the prefilled form link for my form, like this:
=concatenate("https://docs.google.com/forms/MYFORMLINK/viewform?usp=pp_url&entry.465281926=",D10)
This is where D10 from the Control sheet stores the previous calculation of what the next stock number should be.
All of this works great so far, and everything works fine.
Problem:
Google Sheets has this really annoying feature where you can't just click a link in the sheet, you have to hover over it and then click the attached link. It's frustrating, and I'm trying to simplify and clean up steps. I simply want to pass the URL stored in G9 to an action attached to a button, let's call it AddStock. How do I do this?
I've been trawling the internet for hours trying to work it out, and can't seem to figure it out myself (admittedly I have very limited coding understanding, but people keep talking about popup blockers, etc).

Dynamic dependent dropdowns on Google Form

I need to add the following functionality on a google form -
I need to have two dropdowns on the form-
Dropdown1 values are being populated from the google sheet using a script.
Dropdown2 values must also be populated from the google sheet BUT must change based on the value selected in Dropdown1 on the form.
Since Dropdown1 has many values in the list, using the "go to section based on answer" is not an option to show Dropdown2.
How can I implement this cascading/dependent dropdown functionality dynamically on the google form (I guess using the google script and google sheet)?
Thanks in advance!
Answer:
Unfortunately, this is not possible using Google Forms.
Explanation:
In order to change the contents of later dropdowns based on the selected answer in a previous question, direct access to the browser session must be retrieved by Google's server before form submission. This isn't done.
Until a form has been submitted by the user, giving explicit permission to send the answers they have provided, the answers are not communicated to Google's servers and as such later questions can not change based on previous answers. Implementing this would be a privacy issue so I can not forsee Google creating this option in the future either.

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

Google form with a filter field

I'm trying to create a google form with a field which takes the values as a list from spreadsheet. Right now i'm using formRanger scrip but my list is to long, 200 entries, how can i make it similar to android contact search. That it will filter the entries based on keystroke.
So it seems that nothing has changed in the last 8 years and the best solution to date seems to:
put the long list as a single question on separate section
advice users to use Ctrl+F to find the needed option.
This has advantage over drop-down that it's much easier to scroll the whole page than dropdown which user can accidentally close and will need to open and search again.
It sounds like you are looking for an "Autocomplete" entry for your form.
As the user types an entry into the form field, a dropdown list appears showing matching entries lifted from a Google spreadsheet column.
The following solution using HtmlService works great for lists having over 200 entries.
I've tried it!
"Populate jQuery autocomplete list using value array from Google Spreadsheet"