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

Gravity Forms Course Enrollment Premium Add-on Setup Guide

Updated 7 min read Gravity Forms Integrations A–Z
On this page
  1. Video walkthrough
  2. What You Get
  3. Requirements
  4. Install and Activate
  5. Enroll Students From a Form
  6. Who is enrolled
  7. Which courses
  8. Start and order total
  9. List Your Courses in a Field
  10. What Happens When the Form Is Sent
  11. Merge Tags
  12. When a Course Is Finished
  13. Conditional Logic and Payments
  14. The Settings Page
  15. Frequently Asked Questions
  16. Does it work with LearnDash, Tutor LMS or other LMS plugins?
  17. Why does it create a LearnPress order?
  18. Can a form enroll an existing student?
  19. Does it take payments?
  20. Can a student pick a paid course and get it for free?
  21. Does it work with LearnPress Pro add-ons?

Video walkthrough

Gravity Forms LearnPress: Enroll Students in Courses from a Form (Free LearnPress)
Enroll students in LearnPress courses from a Gravity form Watch on YouTube

Course Enrollment joins Gravity Forms and the free LearnPress plugin. A feed turns any form into an enrollment form for your online school: it creates a safe WordPress account for a new student, or uses the student who is logged in, and enrolls that account in the courses you choose. A second kind of feed runs when a student finishes a course and turns the result into a Gravity Forms entry, for example a feedback form or a certificate request, or into a notification.

A Gravity Forms enrollment form with first name, last name, email and a course drop down filled with LearnPress courses and their price, such as Portrait Lighting Masterclass ($49.00) and Photography Basics (Free)
A form whose course list is filled by the add-on, with the price of each course.

What You Get

  • An Enroll in LearnPress course(s) feed: fixed courses, or the courses a student picks in a choice field.
  • Enrollment through a completed LearnPress order, so LearnPress keeps its own order records, statistics, enrolled e-mails and hooks.
  • Your published courses offered as form choices with their price.
  • A When a LearnPress course is finished feed that adds an entry and sends the notifications of the event LearnPress: course finished.
  • Merge tags for the course title, link, id, price and the student username.
  • Conditional logic, delayed payment support, an entry note for every step and a clear notice when LearnPress is missing.

Requirements

You need Gravity Forms 2.9 or newer, the free LearnPress plugin 4.2.7 or newer and a valid GravityExtra license key. The add-on makes no outside requests of its own. LearnPress keeps doing its own work, including its e-mails, which it queues with a request to your own site.

Install and Activate

  1. Install the add-on zip under Plugins, Add New, Upload Plugin, and activate it. Install and activate the free LearnPress plugin from WordPress.org.
  2. Open Forms, Settings, Course Enrollment and enter your license key.
  3. Create the courses in LearnPress as usual. Only published courses are offered.

Enroll Students From a Form

Open a form, choose Settings, Course Enrollment and add a feed. Give it a name and keep the action on Enroll in LearnPress course(s) when the form is submitted.

The Enroll in LearnPress course(s) feed settings in Gravity Forms: who is enrolled, account field mapping, the course source, start and order total, and the field that lists the courses
The enrollment feed: who is enrolled, which courses and how the course starts.

Who is enrolled

The Student setting has three choices. The default enrolls the logged-in user, or creates a new account for a visitor. The second always creates a new account for the email in the form. The third enrolls only a logged-in user and skips visitors. Map the email, the first and last name and, if you like, a username and a password. When you map no username the add-on builds first.last, or uses the email. When you map no password the student gets the standard WordPress e-mail with a link to set one.

Safety comes first. The add-on never changes an existing account. If a visitor types an email that already has an account, the default is to refuse, write an error note and enroll nobody. You can choose to enroll that account instead: it only gains the course, and its name, password and role stay as they are. A new account gets the role you choose, but the list never offers a role that can manage users or the site, so a form can never create an administrator.

Which courses

With This list, everyone who sends the form is enrolled in the ticked courses. With A choice field, the student picks the course or courses in a drop down, radio buttons or check boxes; the answers can be course ids or course titles, and a Gravity Forms product choice is read before its price. Tick courses in the list to allow only those; tick none to allow every published course. A course that costs money and is picked by the student is enrolled only when the entry is paid: use the option to enroll when the payment is completed, so the feed waits for your payment add-on.

Start and order total

Start the course at once gives the status enrolled. Without it LearnPress follows its own Auto start setting: a course that costs money is added as purchased when that setting is off, and the student starts it in LearnPress. The order total decides what the LearnPress order records. Choose Nothing when the form takes no money, or The price of the courses when the form was paid for, so that LearnPress statistics match your income.

List Your Courses in a Field

Pick a drop down, radio buttons or check boxes field under Course choices and the add-on fills it with your published courses, each with its price, for example Portrait Lighting Masterclass ($49.00) or Photography Basics (Free). The value is the course id. You can list every course or only the ticked ones. Draft courses are never listed.

What Happens When the Form Is Sent

  1. The add-on checks the license and that LearnPress is active.
  2. It works out the courses and refuses any course that is not published, is outside the ticked list, or costs money without a paid entry.
  3. It finds or creates the student account, following the safety rules above.
  4. It creates a LearnPress order, adds the courses, and completes it. LearnPress then creates the course records, fires its enrolled hook and queues its e-mails.
  5. Every step writes a note on the entry, and every problem is written as an error note. The entry also stores the student user id and the course ids.

A course the student already has is never enrolled twice, and a finished course is never re-opened. Use LearnPress itself for a retake.

Merge Tags

Use these tags in confirmations and notifications of the form: {lp_course_title}, {lp_course_url}, {lp_course_id}, {lp_course_price} and {lp_user_login}. With several courses the values are separated by commas. They are listed in the merge tag drop down of the form editor. For example, set the confirmation to: You are enrolled in {lp_course_title}. Open it here: {lp_course_url}.

When a Course Is Finished

Add a second feed and choose When a LearnPress course is finished. It does nothing when its form is sent. It runs when a student finishes a course in LearnPress, using the LearnPress hook that fires when a course is finished, whether the student passed or failed.

The When a LearnPress course is finished feed settings in Gravity Forms: courses, result, add an entry, send notifications and the entry field mapping for the course title, result, score and date
The finished-course feed turns a result into an entry or a notification.
  • Courses: tick the courses it reacts to, or none for every course.
  • Result: any result, passed only or failed only.
  • Entry: add an entry to the form for the student. The entry belongs to the student. Use it for a feedback form, a certificate request or a retake offer.
  • Notifications: send the notifications of the form whose event is LearnPress: course finished. Gravity Forms notifications need an entry, so when you turn the entry off it exists only for the moment the notification is sent.
  • Fill the entry fields: choose the form field for the student email, name, first and last name, username, the course title, id and link, the result, the score in percent and the date finished.

The same finished course makes one entry per feed, even if the hook fires twice. A feed that is inactive, or a site without a valid license, does nothing.

Conditional Logic and Payments

Use the Conditions section to run an enroll feed only when an answer matches, for example only when a box is ticked. The condition of a finished feed is checked against the entry it would create. When the form takes a payment, the feed can wait until the payment is completed: the student is enrolled once, when the payment add-on releases the feed, and never twice.

The Settings Page

Open Forms, Settings, Course Enrollment to activate your license key. The feeds only work with a valid license. The add-on adds the student user id and the course ids to the entry as values you can filter on.

Frequently Asked Questions

Does it work with LearnDash, Tutor LMS or other LMS plugins?

No. This add-on is for LearnPress. GravityExtra has separate add-ons for other LMS plugins.

Why does it create a LearnPress order?

LearnPress enrolls a student when an order is completed. Going through the order means the course records, the e-mails, the statistics and the hooks of LearnPress, and of any other plugin that listens to them, behave exactly as they do for a normal enrollment.

Can a form enroll an existing student?

Yes. A logged-in student is enrolled when they send the form, and a visitor who types the email of an existing account is enrolled only if you choose that setting. The account itself is never changed.

Does it take payments?

No. Use a Gravity Forms payment add-on for the money. This add-on enrolls when the payment is completed, and can record the price on the LearnPress order.

Can a student pick a paid course and get it for free?

No. A paid course chosen in a field is enrolled only when the entry is paid. A forged value for a course that is not published or not in your list is ignored.

Does it work with LearnPress Pro add-ons?

The automated tests ran against the free LearnPress plugin from WordPress.org. The add-on uses the order and enrollment functions of LearnPress itself, so other plugins that listen to LearnPress hooks are called as usual.

Need help? Open a support ticket and tell us your Gravity Forms and LearnPress versions.

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