Reputation: 3
Im making a form using google apps script, that requires students name and ID, but some students just have submitted fake names or IDs or both! so I really need to 1- check their answers at the same time of responding (dynamic form) or 2- checking the answers after submission
no idea about the 1st approach!
but the 2nd one has a problem, if more than 1 student is submitting at the same time, I cant go to responses spreadsheet and see if the last respond is fake or not, cuz the last one could be the answer of the 2nd student.
I have searched everywhere but nothing works not even this
any idea? thanks
at least I made a onsubmit trigger, collecting emails and studentsId.
then validate the answers, if they were true, a link to another form will be sent to them, and if not it will notify them!
from what I read in this days, the only way to get live answers is to write a HTML page to react to every response.
Upvotes: 0
Views: 479
Reputation: 5852
Should Collect email addresses
be save enough to ensure it is not a fake submit?
What do you mean by 'check' in 1?
Do you mean validation of answer?
If yes, you could do it with either HTML or JS
HTML (validation of input
):
HTML attributes type
, required
, pattern
, maxlength
, minlength
, max
, min
, step
i.e. <input name="age" type="number" min="9" max="12">
JS (validation of formData
):
$('#form').on('submit', function (e) {
e.preventDefault();
var values = {};
$.each($('#myForm').serializeArray(), function(i, field) {
values[field.name] = field.value;
});
if (values['age'] < 10 || values['age'] >12) { return; }
$(this).submit();
})
Upvotes: 1