Display results of two forms for single user, along with calculations

By: Dave Briggs | Asked: 04/20/2023
ForumsCategory: General questionsDisplay results of two forms for single user, along with calculations
Dave Briggs asked 12 months ago
Hi folks! I want to create the following using Formidable: Learners on a course take a survey, rating themselves 1-5 on 5 different subjects. At the end of the course, they take another survey with exactly the same questions. Then I want to present them with a view showing a table with their initial results, then their latest results, with a column then highlighting the positive (or negative - eek!) different the course has made. I have been having a play with having two forms, then a third that pulls through the data and runs the calculations, but it's just not working at all! Can anyone help me? Thanks so much!
1 Answers
Bobby Clapp answered 12 months ago

My approach... Create a form as you normally might with a hidden field called "prestage" and "poststage" and the relevant rating fields. Make the default value [get param=prestatus] for the prestage hidden field and also [get param=poststatus] the poststage hidden field. These are parameters we are going to dynamically fill in and it will help us understand what entries are associated with which stage of the workflow. These will hold pre or post stage status. Maybe that will be "course1-presurvey" and then another would be "course1-postsurvey".

On the page where they fill out the form the first time, insert the form shortcode and set the parameter within that shortcode.

Example: [formidable id=x prestatus="course1-presurvey"]

On the page where they fill out the form the final time, insert the form shortcode and set the parameter within that shortcode.

Example: [formidable id=x poststatus="course1-postsurvey"]

When complete use a view to create the output you want using math shortcode: https://formidableforms.com/knowledgebase/math-calculations/#kb-operators (You can use field IDs to grab dynamic values from the field values instead of static values).

Caveats: A single form cannot be active on the same page at the same time. Also a user could theoretically fill out the form more times than intended. You might then refer to the date and times of the submission.

Dave Briggs replied 12 months ago

That's very helpful, thank you

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right