Prefill google form field with data from the last recorded response in spreadsheet - forms

Is there a way to prefill a google form field with say, the value at the last response row at cell 3 from its spreadsheet?
I know that unfortunately the onOpen trigger in the form only works when openning for edit, not by simply accessing the form to fill out.
Hope someone can help.
P.S. Navigating to a certain value in code is not a problem, I just wish I could get the last value on oppenning the form for fill out.
Thanks.

Related

Laravel 5.4 - Display errors to appended inputs in a form

Whatsup guys
I am struggling with an issue which is displaying errors on appended inputs in a form after submit. I guess there is a simple solution on this which i dont know of because i am a newbie in Laravel.
Scenario:
I have a form where a user needs to select a category and depending on the selection, a few inputs should be appended (with ajax) into the same form below the category dropdown. I have set up the validations and the error rendering on the html but it doesnt seem to work yet the request doesnt pass since it detects the validations.
Any clues?
You will not be able to display the errors next to form inputs that have been retrieved with Ajax. However, you may use an error box at the top of the screen describing the problem. Or you may simply post the form using Ajax instead of a page refresh, then using JavaScript, you can display the errors to the appended input.
If this is not an answer to the question you are asking, please provide code and more details.

How to restrict filling duplicate entry in Google forms

I am working on a Google form where I keep receiving responses every minute. I want to restrict people in case if they are filling the response with the same unique id in column R.
So basically when anyone click on submit button, form should check the values in column R with the value in current form and restrict the user while filling up the form.
I tried doing this in Google form script editor but didn't get the exact code which can validate and stop the user while submitting the form.
Any help will be appreciated. Thanks in advance.
Sanjay
As Zig and Sandy mentioned it is not possible with live forms.
However you have the on submit trigger. You can write your script to look for duplicates of the last record when the form is submitted and in case there is any picks up the email (maybe a required field if they don't have to sign in to fill the form) and let them know their duplicated submit has been removed.

How to update the responses of the google form to the form itself

I am creating a Google Form. I want to insert a count in the end(anywhere,not specific) of the form which will show the number of responses submit till date.This goes like updating the live count. I have tried using script editor for Google Form Add-ons option.But I am unable to view the results automatically or changes. It asks me to accept "Terms of Service" which I don't want to do right now because I am not sure about the way it may result.
There are various options available to view the form results/responses.But here I don't want to view the results later.They should get updated when we click the submit button on form.Please note..simultaneously many users may fill the form.
To implement this,I have thought of logic like whenever submit button gets clicked..the text in the form should get updated.
Please suggest how I can add the count or apply above logic of whenever submit operation is performed. Is it possible?? Any other suggestions are welcomed..Thanks in Advance!!!
I found another possible way of doing this..I received all the responses in Google Spreadsheet..which I later embedded in my site. Solves the purpose..And the embedded data gets updated automatically for the responses !! Cheers

Submitting multiple forms from a single view

Using CakePHP I have a page where I have multiple forms. Each form updates a single field on a record. I'm trying to implement a way to submit all the forms through a single "Submit All" button. However, all my solutions so far have been lest than successful.
My first attempt was to create a separate action called editAll in the controller that took an array, but I cannot figure out how to send the data from all the forms to that action without having a hidden form that saves all that data. The second idea was to create some kind of Javascript function that iterated over all the forms to create an array to be sent to the controller's editAll action.
The first implementation did not work, and I couldn't find a reasonable way to implement the second idea.
Basically, I was hoping someone could point me in the direction to submitting multiple forms (or at least the data from multiple forms) at once from a single page.
I assume you don't ALWAYS want to submit them all - if you do, then just make one form. If you're hoping to be able to submit some of them individually, but also be able to submit them all, then you could do something along the lines of this:
Keep all the fields in one form. For each field have a 'submitted' value (1 or 0). If they click the Submit next to an individual field, turn all of the submitted values to 0 except that one, then submit the form.
If they click Submit All, then turn them all to '1' and submit the form.
Then, when you process the data, just strip anything that doesn't have 'submitted' value of 1.
It would still take some work, and you're submitting more data than is necessary, but.... it's an idea.

Is it possible to take values of an HTML5 SessionStorage and email it?

I'm creating an application with two pages (Page One, Page Two) that have radio buttons on them. The values are stored in sessionStorage and displayed to the user on Page 3. However, I want a Submit button that will take those values in sessionStorage and email it to me (I was planning to use PHP to process and send the email). Can someone help point me in the right direction on how to solve this please?
If you already have a form with your submit button then you could have your javascript insert new inputs of type="hidden", one for each key/value pair. These values will then be submitted with the form so you can process them just like any other POST parameter.