Google Form calculation - App Script / Html / ...?

1,034 views
Skip to first unread message

Luca C.

unread,
May 3, 2022, 4:22:48 PM5/3/22
to Google Apps Script Community
Hi,
I have a trouble with Google Form and I am trying to find a solution. 

In one section of my form I have various textbox (three in this esample https://forms.gle/rUS19EQzsGrJ8bB16) where I need to insert values. 

I want to make aritmetical operation with these values (like sum, average value, ...) and visualize result before going to the next section (e.g. if sum > x I can exit, if sum < x I need to go to the next section).

Is it possible to make calculation in Google Form? I have tried but it seems impossible to make dynamical calculation, so maybe is it possible with app script (gs / html)?


Thank you for your kindness
and
sorry for my english.

Best regards
Luca


Clark Lind

unread,
May 4, 2022, 1:08:03 PM5/4/22
to Google Apps Script Community
Yes, you will have to do this with HTML & javascript. There are no functions or methods that allow you to interact with the form while it is in someone's browser; apps script is interacting with the form as it exists on Google servers. So you have to wait until information is passed from the form back to Google where you have access to it. Using JS & html, that code is in the browser and you have some control over it.

Luca Crétier

unread,
May 6, 2022, 6:16:24 AM5/6/22
to Google Apps Script Community
Hi,
thank you for your help. In my case I need:
1) to sum ten numbers in one section of the google form;
2) if average value is less than another I can send form, otherwise I need to compile another section of the google form.

Do you have any advice / idea or example I can follow for a dialogbox html + js (form or sheets or other)?


Best regards
Luca

Luca Crétier

unread,
May 6, 2022, 10:13:05 AM5/6/22
to Google Apps Script Community
Reply all
Reply to author
Forward
0 new messages