Skip Navigation

[Resolved] course questionnaire

This support ticket is created 4 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 7 replies, has 2 voices.

Last updated by Minesh 4 years, 11 months ago.

Assisted by: Minesh.

Author
Posts
#1604293

Tell us what you are trying to do?
I have courses created with Learndash for which I have to create anonymous questionnaires. I created a CPT "Evaluations" I would like to add questions that can be answered with a select (10,20,30,40,50)
the CPT "Evaluations" has a "one-> many" relationship with the CPT Course.

How can I proceed? I made several attempts but nobody convinces me.
I tried to create custom fields of "evaluation" , with a select named with all the text of the question and to make a cred module that created an "evaluation". but in this way I cannot differentiate the questionnaires if necessary.

the ideal would be to have a set of questions to add to the "evaluation" and have a form that represents them to the user with the relative vote select, but I don't understand how to get a list of evaluations in each course ...

#1605517

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

I do not thing I understood your requirement clearly.

As I understand, you want to list the evaluations belongs to the single course? If this is correct: you can create a view or even you can use the block view to display the related post in one-to-many relationship.

Please check the following Doc:
=> https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/#displaying-many-related-items

Once you able to display the related posts for the post type evaluations that belong to your single course. Please let me know what is the next steps you want to achieve.

#1605661

no I don't want to create a list of "evaluation". I need to create a form system where the questions are text and the answers are select fields (with a numerical vote).
and I need each user to create a new "evaluation" at each process so I can list them

#1607019

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

This is still not clear to me and I would like to have more information.

I need to know what post types, custom fields you are using and what is the flow so that each user to create a new "evaluation". Do you mean you want to allow the users to create evaluation" from frontend? If yes - how exactly the form should look like and what information (fields) you want to display with that form.

Once I know your structure and the flow is clear to me then I would be able to guide you in the right direction. Can you please pass me as much information as you can that could help me to understand your issue first.

#1607139

currently i have a CPT "course" and a cpt "evaluation".
these two posts are in a "one to many" relationship.
I would like to create a system that allows the user to save an new "evaluation" through a cred form.
obviously the questions must not be modifiable, while the answers must be select with a numerical mark from 10 to 50 (10,20,30,40,50)
I am in trouble because if I create custom "evaluation" fields: "questions" and "answer", and then I create a form that creates a new post "evaluations", both the questions and the answers are editable.
I wish users could only apply the vote to the questions.
I hope I have explained myself now

#1607917

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

currently i have a CPT "course" and a cpt "evaluation".
these two posts are in a "one to many" relationship.
I would like to create a system that allows the user to save an new "evaluation" through a cred form.
obviously the questions must not be modifiable, while the answers must be select with a numerical mark from 10 to 50 (10,20,30,40,50)
I am in trouble because if I create custom "evaluation" fields: "questions" and "answer", and then I create a form that creates a new post "evaluations", both the questions and the answers are editable.
I wish users could only apply the vote to the questions.
==>
OK

The thing is that you should try to configure the Questions and Answers as different post types and with the Answers post type you should add a custom field that holds the reply/vode from the user.

If you check with my test site: hidden link
User: demo
PWD: Admin@123

I've configured the Questions and Asnwers as post types:
=> hidden link

Then, I've created one to many relationships between Question and Answers:
=> hidden link

I've added the custom field that will hold the reply/vote from the user:
=> hidden link

Then, I've created the following form for the answers:
=> hidden link

Then I've created the following view which will display the questions and form to take the answer for that question:
=> hidden link

And I've added the view on the following page:
=> hidden link
[As you can see, it displays all questions and a select box to reply the vote (10,20,30,40,50) and another field (Questions Answers) which is used to relate for which question you are answering. Obviously, we can hide it using simple CSS or we can make a hidden field.

Once you submit, it will create a new entry for answer post type and hold the vote value as well as to what question you submit the answer.

I hope this is clear and help you to understand how you can build the question and answers system.

In addition to that, you can also create a block view to build you view to display the same questions and answers:
=> hidden link
=> hidden link

#1612779

ok thanks, I will try to replicate the system and see if it can be fine

#1613319

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Ok - Great.