@staticmethod
    def question_list_onaccept(form):
        """
            If a grid question is added to the the list then all of the
            grid children will need to be added as well
        """

        qstntable = current.s3db.survey_question
        try:
            form_vars = form.vars
            question_id = form_vars.question_id
            template_id = form_vars.template_id
            section_id = form_vars.section_id
            posn = form_vars.posn
        except __HOLE__:
            return
        record = qstntable[question_id]
        qtype = record.type

        if qtype == "Grid":
            widget_obj = survey_question_type["Grid"]()
            widget_obj.insertChildrenToList(question_id,
                                            template_id,
                                            section_id,
                                            posn,
                                            )
        if qtype == "Location":
            widget_obj = survey_question_type["Location"]()
            widget_obj.insertChildrenToList(question_id,
                                            template_id,
                                            section_id,
                                            posn,
                                            )

    # -------------------------------------------------------------------------
dataset/ETHPy150Open sahana/eden/modules/s3db/survey.py/S3SurveyQuestionModel.question_list_onaccept