Skip to main content

How to Add a Survey Form to your LearnDash Course

By September 21, 2023March 15th, 2024LearnDash
Survey Form
Survey Form

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.

Upload the Gravity Forms plugin to WordPress

Step 3: Install and activate the plugin.

Once you have uploaded the .zip file, select Install Now then Activate Plugin.

Install and activate the plugin

Step 4: Navigate to the Forms tab

After you install and activate gravity forms, navigate to the Forms tab.

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.

Fields section


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.

View your created form-1

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

View your created form-2

Looking to customize your LearnDash Course with a survey form that is tailored to your needs?

Explore our amazing LearnDash Development Services

Add 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.

Create a new lesson

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.

Insert form

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.

View the survey form

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.

Add the newly created lesson as the last lesson of the course
Add the newly created lesson as the last lesson of the course-2
Add the newly created lesson as the last lesson of the course-3

Enable Mark Complete button only on the submission of Survey Form

In order to make the submission of survey form mandatory we would require a way that keeps the mark as complete button hidden until user submits the survey form once the form is submitted mark as complete button appears.

You can prevent the form from showing up again for the users who have already filled it by using the following code to your theme’s functions.php file. (You can find it in /wp-content/theme/your-theme-name/ )


In the following places of code you would require to replace the ‘form id’ with the form id of your form in use.

  1. In sft_check_submissions() function.
    Replace $form_id = 6 with the form id of your form in use ($form_id = your form ID).
  2. 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);
  3. 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:

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
Enable Mark Complete button only on the submission - 1

Once the form gets submitted, the user is shown the ‘Mark Complete’ button to click.

Enable Mark Complete button only on the submission - 2

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

Enable Mark Complete button only on the submission - 3

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.

Share with

Leave a Reply

Subscribe to our Newsletter

paper-planeAdvance Your Learning Impact

Join our community of 5,500+ passionate educators and course creators mastering LearnDash. Get insights on new LearnDash plugins, LearnDash themes, and the latest LearnDash features delivered straight to your inbox.