Menu

Form file structure

Ignacio Capurro

To start collecting form data we need to create a form file to read with the program and create the database structure and fill the logical structures for the form.

The form file has the following structure:

Pregunta Respuestas Condiciones previas de Valores Condiciones de Cantidad Condiciones de Valores No vacia No acepta valores duplicados Pregunta funnel
Question Name Integer Question Rule Question Rule Question Rule Boolean Boolean Question Name

Every row represent a question and the order of the rows represent the order of the questions in the form.

The columns are:

  • Pregunta: It's the Question name. This name will be the name of the column in the mysql system, so it can't have white spaces and it must begin with a alphabetic character. The regular expression for the question names is "\w[\d\w]*". There cant have duplicate questions names.

  • Respuestas: It's the quantity of responses for the question. Unique answer questions will have 1 (one) and multiple answer questions will have 2 or more. Note: Some aspects of the results of question rules vary depending on wich question type is defined.

  • Condiciones previas de Valores: This is the question rule for skipping questions based in the value of previous questions. It must be defined with the questions defined above this one. The syntax is described in the section [Question rules].

  • Condiciones de Cantidad: This is the question rule for skipping questions based in quantity of responses of previous questions. Syntax is described in [Question rules].

  • Condiciones de Valores: This is the question rule for the question accepted values. The only variable name accepted is the question name and it uses the same question rules described in [Question rules].

  • No vacia: This field says whether the question can (false) or can't (true) be empty. In questions of multiple answers this value implies that the question must be fully completed, in other words it must have as much responses as quantity of responses defined.

  • No acepta valores duplicados: This field only applies on multiple answer questions and depending on it's value says if the answer can (false) be duplicated or not (true).

  • Pregunta Funnel: This field is used to say if the question is a funnel of another and which other. Basically funnel questions can't have responses that aren't in the question that they are funnel of.


Related

Wiki: Home
Wiki: Question rules

MongoDB Logo MongoDB