Is it possible to add fields to a Google Form which are visible only to specific users (based on their email ID)? Or allow only users whose email IDs fall in a set to fill the fields?
Google Forms doesn't include a feature to hide questions.
Google Forms could use page navigation to control wich questions will be available for the respondents but it's controlled by multiple choice questions, not by users ID.
Create an specific form for each set of users then send to each of them the corresponding form.
- Later you could merge the answers of all the forms or you could do it dynamically by using arrays to join/merge non-adjacent ranges.
- Different Google Forms could send the answers to different sheets of the same spreadsheets.
- If you decide to use different spreadsheets for each form, you could use IMPORTRANGE() to put in one spreadsheet all the response ranges.
I have not tried this but I think probably Google Script might help you in this. Find this link to create a google forms programmatically. https://developers.google.com/apps-script/reference/forms/
This service allows scripts to create, access, and modify Google Forms.
// Create a new form, then add a checkbox question, a multiple choice question, // a page break, then a date question and a grid of questions. var form = FormApp.create('New Form'); var item = form.addCheckboxItem(); item.setTitle('What condiments would you like on your hot dog?'); item.setChoices([ item.createChoice('Ketchup'), item.createChoice('Mustard'), item.createChoice('Relish') ]); form.addMultipleChoiceItem() .setTitle('Do you prefer cats or dogs?') .setChoiceValues(['Cats','Dogs']) .showOtherOption(true); form.addPageBreakItem() .setTitle('Getting to know you'); form.addDateItem() .setTitle('When were you born?'); form.addGridItem() .setTitle('Rate your interests') .setRows(['Cars', 'Computers', 'Celebrities']) .setColumns(['Boring', 'So-so', 'Interesting']); Logger.log('Published URL: ' + form.getPublishedUrl()); Logger.log('Editor URL: ' + form.getEditUrl());
With Google Script, you can access logged in users email id with :
// Log the email address of the person running the script. Logger.log(Session.getActiveUser().getEmail());
By combining these two functionalities it might be possible to add questions as per users. I hope this might help you. I'll edit this post with proper code if I get the time.