🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!

Gravity Forms Student Enrollment Premium Add-on Setup Guide

Updated 8 min read Gravity Forms Integrations A–Z
On this page
  1. Video walkthrough
  2. What You Get
  3. Requirements
  4. Install and Activate
  5. Add an Enrollment Feed
  6. Account Safety
  7. Fixed Courses or a Choice Field
  8. List the courses in the form
  9. Payments
  10. When a Course Is Completed
  11. Merge Tags and Entry Notes
  12. For Developers
  13. Limits to Know
  14. Frequently Asked Questions
  15. Do I need MasterStudy LMS Pro?
  16. Will the student get the MasterStudy LMS e-mails?
  17. Can a visitor enroll in a paid course for free?
  18. What happens when the email already has an account?
  19. Does it send data outside my site?

Video walkthrough

Gravity Forms MasterStudy LMS: Enroll Students in Courses from a Form (Free MasterStudy)
Watch the Student Enrollment add-on create a MasterStudy LMS student and enroll them from one Gravity Forms form. Watch on YouTube

Student Enrollment joins Gravity Forms and the free MasterStudy LMS plugin. A feed on your form creates or finds a safe WordPress account and enrolls it in the courses you choose, and a second kind of feed turns a completed course into a Gravity Forms entry or notification. Use it for an application form that opens a course, a paid sign-up that unlocks lessons, a free taster form, a school intake form or a feedback request after a course.

A Gravity Forms form whose drop down lists the MasterStudy LMS courses: Photography Basics, Portrait Lighting Masterclass and Street Photography Field Guide marked paid with their price, and Quick Start Lens Guide
The drop down is filled by the add-on with your published courses, paid ones with their price.

What You Get

  • A feed called Enroll in MasterStudy LMS course(s). When the form is sent, or when its payment is completed, it makes or finds the student account and enrolls it.
  • Enrollment with the same functions MasterStudy LMS uses when an instructor adds a student: the course is added to the student and the student counter of the course goes up. The add-on does not write to the MasterStudy LMS tables by hand.
  • A student who is already enrolled is left alone: nothing is added twice and the start time does not change.
  • Fixed courses ticked in the feed, or the courses a student picks in a choice field.
  • Form choices filled with your published courses, with the price of a paid course in the label.
  • A second feed type: When a course is completed, which adds an entry to a form, sends its notifications, or both.
  • Merge tags for the course title, link, id and instructor and for the student username.
  • Conditional logic, entry notes, a clear notice when MasterStudy LMS is missing or too old, and no outside requests.

Requirements

  • WordPress 6.5 or newer and PHP 7.4 or newer.
  • Gravity Forms 2.9 or newer.
  • The free MasterStudy LMS plugin, version 3.5 or newer. This version was tested with MasterStudy LMS 3.7.55.
  • A GravityExtra license key.

Install and Activate

  1. Install and activate Gravity Forms and the free MasterStudy LMS plugin if they are not active yet.
  2. Upload and activate the Gravity Forms Student Enrollment Premium Add-on.
  3. Go to Forms → Settings → Student Enrollment, enter your license key and press Activate.

If MasterStudy LMS is missing, too old or switched off, a notice on the Forms screens says so. Your forms keep working and the entries are saved, but nobody is enrolled.

Add an Enrollment Feed

Open Form Settings → Student Enrollment, press Add New and keep the action on Enroll.

The student enrollment feed settings in Gravity Forms: who is enrolled, the account fields, the list of courses, the payment option and the choices section
One feed: who is enrolled, which courses, and how the choices are listed.
Setting What it does
Learner The logged-in user, or a new account for a visitor (the default); always a new account for the email in the form; or only the logged-in user, so visitors are skipped.
Email that already has an account Refuse (the default): an error note is written and nobody is enrolled. Or enroll that account: only the enrollment is added, nothing else about the account changes.
Role of a new account The WordPress default role, or another role from the list. Roles that can manage the site, users or courses are never in the list, and neither is the MasterStudy LMS Instructor role.
New account e-mail Send the standard WordPress e-mail with a link to set a password, and optionally the new user notice to the administrators.
Account fields Map the email, and optionally a username, a password, first name, last name and display name.
Enroll in This list: everyone is enrolled in the ticked courses. Or a choice field: the student picks.
Courses One tick box per published course. With a choice field the ticked courses are the only ones that may be picked.
Payment Tick the option to enroll a course picked in a field only when the entry is paid, even when the course is free.
Condition Use the feed only when the conditional logic you set is met.

Account Safety

The add-on is careful with accounts, because a form is open to everyone.

  • It never takes over another account. An email that already belongs to a user is refused by default. When you allow it, the account only gains the enrollment: its name, password, role and everything else stay as they are.
  • It never hands out a role that can manage the site or the courses. Administrator, the MasterStudy LMS Instructor role, Editor and every role with the capability to edit users, list users, install plugins, edit posts, upload files or edit courses are refused, even if a feed was saved with one.
  • A username that is taken or not valid creates nothing. A typed username is cleaned of spaces and markup.
  • A logged-in user is enrolled directly, with no new account. A logged-in only feed skips visitors and says so in the entry notes.
  • A student who is already enrolled is left alone.

Fixed Courses or a Choice Field

With This list, tick the courses and everyone who sends the form is enrolled in them. With A choice field, pick a drop down, radio buttons, check boxes, a multi select or a product field. The answers may be the course id or its title, so a choice field you typed by hand works too. Only published courses can be enrolled. A draft, an unknown id or a course outside your ticked list is refused and the entry gets an error note.

List the courses in the form

In the Choices section pick a field. Its choices are replaced by your published courses, and the value of each choice is the course id. A paid course shows its price in the label, for example Portrait Lighting Masterclass (paid, $49), in the currency set in MasterStudy LMS. You can list every course or only the courses you ticked. The list follows your catalog, so a new course appears in the form without editing it.

Payments

MasterStudy LMS stores a price mode for every course: free, paid or affiliate. A paid or affiliate course is treated as paid by the add-on. If your payment add-on has the option to run feeds only after the payment is completed, tick Enroll only when payment is completed in the feed. The account is made and the student is enrolled when the payment is complete, not before.

When a student picks a paid course in a field, it is enrolled only for a paid entry. For forms that offer free courses, tick the payment option of the feed if you want every picked course to need a paid entry. A fixed list is always enrolled, because you chose it. Developers can change what counts as free with the filter gfxmasterstudy_course_is_free.

When a Course Is Completed

Change the action to When a course is completed. This feed does nothing when the form is sent. It runs when MasterStudy LMS reports a progress of 100 percent for a student who is enrolled in the course.

The course completed feed settings: the courses to watch, the entry and notification options and the entry field map
The second feed type reacts when a student completes a course.
  • Courses to watch: tick some, or none for every course.
  • Add an entry to the form for the student. Map the student email, name and username, the title, id, link and instructor of the course and the date. The entry is owned by the student.
  • Send notifications of the form that use the event MasterStudy LMS: course completed. Gravity Forms needs an entry for its merge tags, so with the entry option off the entry exists only while the notifications are sent.
  • Conditional logic can look at the values that would go in the entry.

Use it for a certificate request form, a feedback form after a course, a thank you e-mail or a message that offers the next course. A completion counts once for each student and course. When an instructor or an administrator resets the progress of a student, or removes the student from the course, a later completion counts again. A course that gets a new lesson after a student finished it does not create a second entry.

Merge Tags and Entry Notes

Merge tag Value
masterstudy_course_title in curly braces The title of the course, or the titles separated by commas.
masterstudy_course_url in curly braces The link to it.
masterstudy_course_id in curly braces Its id.
masterstudy_course_instructor in curly braces The name of the instructor (the author of the course).
masterstudy_user_login in curly braces The username of the enrolled student.

They work in confirmations and notifications of the same form and appear in the merge tag list of the form editor. Each entry gets a note for every step: the account that was made, each course that was enrolled, and the reason for anything that was not.

For Developers

The add-on enrolls with STM_LMS_Course::add_user_course( $course_id, $user_id, $first_lesson ) followed by STM_LMS_Course::add_student( $course_id ), the two calls MasterStudy LMS makes when an instructor adds a student or an order is accepted. It reads the state with STM_LMS_Course::get_user_course. It listens to stm_lms_progress_updated for completions, and to masterstudy_lms_student_progress_reset and masterstudy_lms_after_delete_user_course to count a new start. Because enrollment goes through MasterStudy LMS, any code that hooks the action add_user_course runs as for any other enrollment.

Limits to Know

  • MasterStudy LMS sends no single course completed action in the free plugin, so completion is read from the progress it reports. A progress of 100 percent is a finished course.
  • The free plugin keeps no grade for a course, so the completion entry has no grade.
  • The add-on does not take payments. Use a payment add-on and the option to enroll when the payment is completed.
  • It does not unenroll students. It follows the enrollments MasterStudy LMS makes.

Frequently Asked Questions

Do I need MasterStudy LMS Pro?

No. The add-on works with the free MasterStudy LMS plugin from wordpress.org.

Will the student get the MasterStudy LMS e-mails?

MasterStudy LMS decides. The add-on enrolls through the MasterStudy LMS enrolment function, so the actions and settings of MasterStudy LMS apply as for any enrollment.

Can a visitor enroll in a paid course for free?

Not through a choice field: a paid course needs a paid entry. A fixed list is your own decision, so use it only for forms that really give the course away or that you approve first.

What happens when the email already has an account?

By default nothing: the entry gets an error note. If you allow it, only the enrollment is added to that account.

Does it send data outside my site?

No. Everything happens on your own site. Only the license check talks to gravityextra.com, when you press Activate.

Still need help?

Our support team answers tickets every day, usually within a few hours.

0
0
Your Cart
Your cart is emptyReturn to Shop
🔥 FREQUENTLY BOUGHT TOGETHER
Complete Combo & Save 40%!
ITEM IN YOUR CART
Gravity Forms Klaviyo Add-on
$39.00/yr
+
🎁 RECOMMENDED ADD-ON SAVE 40% OFF
Original Price: $39.00/yr
Bundle Special Price: $23.40/yr