What is the best way to make Survey doctypes in Schools?

I don’t know is it the correct place to post my question or not
I’m new in ERPNext and trying to create a survey system under the Schools app in ERPNext
The Survey may be about “Course”, “Room”, “Instructor”…etc

I have this structure

  • Survey (docType)
    ------ Type (Select represents doctype of the school module [Instructor/Room/Course]
    ------ Description
    ------ Start Date *
    ------ End Date *
    ------ Status

  • ---- Survey Questions (Table)
    ------ Question Text *
    ------ Question Type (select Text/Multiple choice / True or False Question) *
    ------ Question Options (Table)

  • ---- Survey Results/Responses (Table)
    ------ User which make the response *
    ------ Response Date/Time
    ------ Questions Answers (Table)

I have created these doctypes
but I have a problem
can not show the options of the answers in the survey response doctype
and I want to list all Rooms if user selected the survey type “Room”
if he choose that the survey about instructors I want to preview list of instructors … etc

I’m confused about the correct representation of my structure as doctypes

1 Like

Nice.

Create separate Doctype for Survey questions, and not as a child form. Create a Web Form for the Survery Questions doctype only.

You can set dependency of field like Room, Instructor etc. based on the selection of Survey Type.

Also, if Room and Insturction is added as a link field, then it will behave like a dropdown field for the user, with option pre-filled.

1 Like

Thanks Umair for your reply … it helped me so much

I have couple of things not working well after I applied what you told me

After I choose Room/Instructor/Course from the survey about select
I want the label changes dynamically to be “Room ID/ Instructor ID…etc”

also the button of create new Instructor / Room doesn’t appear in the second select

Another problem in the grid when I click on the highlighted space it does not open the form of survey question

This is Survey doctype

Survey Question Doctype

Question Option Doctype

1 Like

I suggest create web Forms or web views if it is for general public.

I will create a web form for the public / frontend users
but here the admin creates the survey and set the questions of the survey to be posted for public users on the website

Admin or just users or moderators that have access with a username and password?

If it is admin, just create a doctype, if it is users you need to make dynamic form generator. And I think it is a little more complex.

They may be many types of users can create surveys
how can I make dynamic form generator?
I’m sorry if it is a stupid question, I’m new in ERPNext and my knowledge is very little about customization

What I suggest create a doctype for each survey which contains questions.
Create a doctype form, a dynamic which chooses dhe fields and type (this is plain javascript or you can use JS libraries).
Then based on these created data submit and create a new doctype which includes the survey questions.

I don’t know if I was very clear with the explanation.

Inline replies below.


After I choose Room/Instructor/Course from the survey about select. I want the label changes dynamically to be “Room ID/ Instructor ID…etc”

Will check and confirm that shortly.

also the button of create new Instructor / Room doesn’t appear in the second select

Depends on the roles assigned to the user. Perhaps roles assigned to your profile doesn’t include permission to create new Instructor or class.

Another problem in the grid when I click on the highlighted space it does not open the form of survey question.

Click on the option on the right-side to expand the form.

Unfortunately, custom labeling based on value in other field is not configurable from within the Doctype. Request you to give some generic name to the field.