Use a response text to define a section break

1

I need to create a form using a script, it should have the distinction of being divided into several pages. The functionality that I must generate is that in the first screen ask for the email, and when clicking on next one you should check if the email is in a Google Sheets form, in case you are not going to a screen where you ask for the data, and if you are that request for personal data would be skipped.

I saw that something similar can be done depending on whether CheckBox is pressed, what I need to do is validate it according to what email is written.

    
asked by Christian Barcelo 27.06.2017 в 17:51
source

2 answers

1

Of course, if your question is understandable, the answer is to create a command sequence with 2 parameters:

  • Your code
  • The HTML of the form to show example attached image.
  • In the first code file you will place the following instruction:

    function doGet(e) {
    
      var html = HtmlService.createHtmlOutputFromFile('Form.html');
      
      return html;
    }

    In the Form.html you will create your form in html with the fields you need and you can add the styles or whatever you prefer, now answering your question:

    Initially you place an input field where you request the email and a button to send these within a form, the other fields you put display="none" through the ID. After doing your validation, I suppose you know how to find that email in a database (spreadsheet), you tell it to change the value display none to Hide or block according to a conditional IF / else.

    I think the explanation is extensive if you have doubts you can write to me and I'll help you.

    Remember that you must have knowledge in HTML5 / CSS3 / Javascript.

        
    answered by 10.07.2017 / 19:31
    source
    2
      

    NOTE: Initially the question was about Google Forms.

    Google Forms / Google Forms includes data validation as a feature but does not include verifying that the captured data is in a Google spreadsheet.

    Validation can be done through simple rules, for example, that the format of the entered value is that of an email address, you can also use regular expressions but these have some limitations that have not been reported by users, I doubt very much that in accept one as a regular expression with several email addresses, maybe you could verify for example, that they are from a certain domain.

    In relation to navigation control, the Google Forms / Google Forms only include as a navigation control feature type questions

    • multiple option (radio button)
    • drop-down list

    Checkboxes can not be used for this type of questions checkbox (checkbox) or questions such as short text, long text (paragraph), quad, etc.

    They also do not include the function of adding custom JavaScript

        
    answered by 29.06.2017 в 03:23