
Forms play a vital role in a Learning Management System (LMS), regardless of whether they are used for feedback, market research, or customer satisfaction surveys.
They are essential for collecting a variety of information from students that help understand what they really think about the platform and things you can improve on your learning platform.
How does the survey help you with the courses?
First, let’s understand why we need Surveys. Let’s imagine you have a LearnDash course and you’re interested in assessing its effectiveness among the students. Here’s the catch! LearnDash does not offer any feature that allows you to take surveys.
Gravity Forms is a popular form plugin that allows you to create survey forms. For instance,you might want to create a survey form where your students can rate their understanding of each lesson in a particular subject.
Then you can embed the survey on a page or post using the Gravity Forms shortcode.
In this article, we will guide you through the process of creating a survey form for your LearnDash course. The steps are straightforward and easy to follow, so be sure to read through and implement them.
Creating a new Gravity Form
Step 1: Download Gravity Forms
Once you buy an annual license for Gravity Forms, you can download the plugin in a .zip format. Keep this .zip file on your desktop.
Step 2: Upload the Gravity Forms plugin to WordPress.
In your WordPress dashboard, select Plugins > Add New. Click Upload Plugin, then locate the Gravity Forms .zip file on your computer to upload.

Step 3: Install and activate the plugin.
Once you have uploaded the .zip file, select Install Now then Activate Plugin.

Step 4: Navigate to the Forms tab
After you install and activate gravity forms, navigate to the Forms tab.

Step 5: Create a form
Click on Add New and give the title and description for your form and click on create form.

Step 6: Form editor
Once you click on Create Form after filling the form title and description, you will get the screen where you can drag and drop the elements and build your own form.

Step 7: Fields section
On the right panel you will find the options to add standard fields, advanced fields, post fields and pricing fields. All you have to do is simply drag and drop the required fields for your form.

Pro-Tip
If you want to create a comprehensive survey and require fields to accept values such as rating, scale, rank, etc., Gravity Forms offers a survey add-on that enables you to obtain such fields. You can utilize these fields to accept different types of ratings from the user.
Step 8: View your created form
After you have finished designing your form click on the save form button to save your form.

You can now see your newly created form under the forms tab.

Looking to customize your LearnDash Course with a survey form that is tailored to your needs?
Explore our amazing LearnDash Development ServicesAdd Gravity Form as the last lesson of the course
If you want to collect feedback from the learners after they finish the course, you can add a gravity form as the final lesson of the course.
Here are the steps:
Step 9: Create a new lesson
Add a new lesson from the lessons tab of the learndash LMS and click on the Add Form Icon.

Step 10: Insert form
When you click on the Add Form button, a popup appears to select which form you want to add from the dropdown. After selecting the desired form, click on the Insert Form button to add it.

Step 11: Shortcode
Here you will find the shortcode that will render the survey form on the course page.

Step 12: View the survey form
Click on the update button once done and view the updated lesson.

Step 13: Add the newly created lesson as the last lesson of the course
Go to your course builder and add the newly created lesson “survey form” as the last lesson of your course.



Important!
In the following places of code you would require to replace the ‘form id’ with the form id of your form in use.
- In sft_check_submissions() function.
Replace $form_id = 6 with the form id of your form in use ($form_id = your form ID). - Append the form id of the form you want to use to the hook name.
add_filter(‘gform_get_form_filter_YourFormID’, ‘sft_gform_get_form_filter_callback’, 10, 2); - In function sft_is_form_present().
if ( strpos( $all_content, ‘[gravityform id=”6″‘ ) !== false )
Replace 6 with the your formID number.
Next, you have to create a new JS file in the Theme folder, naming it as- ‘learndash-gravity-integration.js’ and copy the following code in that file:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
jQuery(document).ready(function(){ let isSubmitted = learndash_gravity_integration_data.is_submitted; let isPresent = learndash_gravity_integration_data.is_present; // Hide the mark as complete button if the gravity form is present on the page and has not been submitted. if ( isPresent && !isSubmitted ) { jQuery(".learndash_mark_complete_button").hide(); } else { jQuery(".learndash_mark_complete_button").show(); } }); |
Once the form ID is changed properly in all the mentioned places mark as complete button will be hidden until the user submits the form.
Looking to add a custom survey form to your LearnDash course?
Let our LearnDash experts handle this for you!
Explore our LearnDash Customization Services
Once the form gets submitted, the user is shown the ‘Mark Complete’ button to click.

Once the form is submitted by the user it is not displayed again.

There you go! We have successfully created a survey form for the LearnDash course.
Wrapping Up!
In conclusion, creating a survey form for LearnDash is a valuable tool for gathering feedback and enhancing the learning experience. By following the steps outlined in this guide, you can design and deploy an effective survey form that meets your specific needs.
In this article we downloaded and installed the Survey add-on. We went from creating a survey form to adding it as a lesson in our course. This is a complete drag and drop process. We also provided you with a code that enables the “Mark as complete” button only on the submission of the survey form.
Be sure to make changes to the code accordingly. A well-designed survey form will enable you to improve your course, cater to learner needs, and provide a better learning experience.