Custom Wizard Plugin 🧙

The Custom Wizard Plugin lets you make user wizards for your Discourse forum. You can provide information, take user input, and perform actions, like creating topics, updating profiles and much more.

:desktop_computer: Get the code

:page_facing_up: Read the documentation

:raising_hand_woman: Request a feature

:bug: Report a bug

Not sure how to install a plugin? Follow the steps here.

You will see this plugin in action when you use the Welcome, Feature Request and Bug Report wizards on thepavilion.io (account required).


Quick links

Wizard Administration
Wizard Settings
Step Settings
Field Settings
Conditional Settings
Field Interpolation

107 Likes
Right way to customize login page and others things
Addressing gender balance in online communities
Discourse Tour - do we have such one?
Locations Plugin
How to edit sign up form?
Unable to find Discobot's editable text?
2019: The Year in Review
Use a form to make a topic
Use a form to make a topic
Make wizards for creating of Personal ads
[PAID] Form to post content to Discourse
Discourse Policy
Members only Category
How to make users to explicitly agree to ToS
Force existing users to fill custom user field
How to create an additional sign up step? User need to upload image upon sign up before they are approved to browse or post
How can i create a contact form in discourse forum?
Tagging users (with interests/passions/skills etc)
Discord "Welcome Screen" onboarding possible?
Secure Media Uploads
Possible bug on Signup Flow with Social and Custom User Fields
Ask users for information *after* sign-up (welcome page?)
How to make users to explicitly agree to ToS
Horizontal admin menu buttons cut off
"Go to quote" and "Was a reply to" filter interactions
Locations Plugin
Require users to join at least one group at sign-up
Modification homepage
Modification homepage
Automatically add a user to a group
Custom page for users
Discourse-common asset availability: difference between development and production?
Feature Request: Automatically add users to groups based on custom field value
[PAID] File sharing plugin
Advice on getting users to use the post template
How to inspire visitors to make the first post?
Making user profile fields mandatory
How can a user send a file in the sign up process?
ProCourse Memberships :money_with_wings:
Changes in text content not reflected on (non-english) site
New Users > Starting Registration with a Prompt/Post
Create a brief questionnaire for a new user signing-up in a private forum to help staff with the vetting process?
Button to link any post in a topic to the first post (shown only for topic owner)
Add a plugin based custom user field to the create account form?
Popup or chatbot to collect leads
Pandoc integration
Custom fields when registering
Discord "Welcome Screen" onboarding possible?
Easier sign up flow

Indeed, thanks guys.

A number of changes going on in core Discourse at the moment that are affecting this plugin. I’ve just updated this again.

This has been tested with the latest Discourse 2020-03-31T03:30:00Z (commit).

If you’re relying on this in production, I would hold off on updating Discourse until at least next week. I won’t be doing any more updates on the master branch of this plugin until at least the weekend.

I’ll also soon be releasing

  • a defined update schedule for this plugin (and a few others), which you’ll be able to follow if you want to reduce the risk of incompatibility with core Discourse

  • v0.2 of this plugin which includes conditionality (e.g. if group = a, show wizard b; if group = b show prefill field 4) on the wizard and field level, expanded rspec and qunit testing, a number of other improvements.

3 Likes

For reference, I could see the test wizard after updating, albeit briefly.

I amended one value in a wizard, hit refresh, back to a blank screen.

Will park testing for now.

1 Like

Did you update after this?

The latest version of this plugin is running on the latest version of Discourse here: try.thepavilion.io. You’ll see a working wizard after signup (or at try.thepavilion.io/w/welcome if you’re already signed in)

2 Likes

Thank you Angus. It is displaying now (i didn’t check functionality yet though)

Using discourse-custom-wizard version 9b03552
and Discourse v2.5.0.beta2 +352 (didn’t update to v2.5.0.beta2 +362 yet)

Implementing conditionality would be fantastic. I’m still struggling to display pictures properly (and minor issues) but besides that the plugin works smoothly. Thanks for all.

1 Like

thx for fix,
anyway there is no documentation on how to configure this wizard. I can’t even manage to display just the tags I ordered. How can I filter it properly? Because of the lack of documentation, I don’t know if I’m doing the wrong thing or maybe it’s a bug…

//
how to display only 2 selected tags (e.g. only tag1 and tag2) or only those allowed by the previously selected category (in the first/same step e.g.?)Screenshot from 2020-03-31 14-36-39

// edit

I’ve tried it here too, but I can’t display two or more tags. Either tag1 or tag2 are displayed. Inputting a comma in one field does not work either.
Screenshot from 2020-03-31 21-32-12

1 Like

+bug / Unfortunately, the images uploaded through the wizard do not work with the active S3

Screenshot from 2020-03-31 16-48-55

// edit
the U variable is not displayed , User Fields like : u{name}, u{user_avatar}, u{date_of_birth},etc are not display.

//
Also, nothing happens when i insert a survey in builder post. Nothing happens then - the form does not go through)

1 Like

so another bug.

When i add action 2 , wizard is working only for administrator but trusted user cannot go to the second stage (stage 1 - creation of the new topic, stage 2 open composer) . Stage 1(action_1) itself works correctly for all users.
Screenshot from 2020-04-04 13-57-25

edit //

In general, other fields (like create topic) do not work either as action_2 (work only for admins)

1 Like

Failed to load resource: the server responded with a status of 500 ()

1 Like

Question and possible feature request: Disabling a Wizard Form and Redirecting Users

Curious if there’s an easy way to disable a wizard form from accepting new submissions, and to give users a custom message?

My discourse forum uses the wizard in a number of ways. To accept surveys entries, and contest submissions, and to help folks create posts that require a consistent theme. I now find myself in a situation where I need to stop submissions, and I’d ideally like to explain this to users and point them to other resources.

The specific situation I find myself in: we had a contest with a deadline and used the form wizard to accept entries. With the contest over, I’d like to point people to a page that does not accept entries, and shows a message “The {…} Contest is over. Review submissions here {url}. Winners will be announced here {url}”. I’d also like to keep the form as unchanged as possible, because I’ll likely reuse it soon for additional contests.

Assuming folks have not already thought of this problem and solved it, some ideas

  • I see that we can limit access to the wizard to certain trust levels. It would be nice to control that message via the form.
  • It might be a good design pattern to always have page 1 just introduce the form, and to not have any form fields. When you want to disable submissions to the form, to have an action-option that redirects people to a webpage, skipping all later form-field-entry steps.
1 Like

You can do what you’re after in the current version of the wizard by:

  1. Create a new step with your message
  2. Move it to the start (you can drag and drop steps)
  3. Add a “Route to” action for that step (routing to back to your forum).

That way you retain the existing wizard, but prevent new entries / progression through the wizard.

Just a heads up that I’m 95% through a significant refactor of this plugin. The existing feature set will be retained, conditionality will be baked into much of the functionality and the code structure (and stability) is significantly improved. I’m also writing extensive documentation for it.

This is why I’m not currently addressing any specific issues anyone may be having with the existing version of the plugin.

7 Likes

Just a heads up @angus, via Updates failed; 'bundle exec rake assets:precompile' failed, I have removed the jquery.putcursoratend.js library from core this week, you can swap it with a function in lib/utilities if you still plan on using that functionality.

11 Likes

Thanks for the post here that was a good clue for me. I just noticed the build process was still failing for me after trying to rebuild the freshly patched vBulletin Emoticon plugin from @cpradio. Admittedly, I knee-jerked a bit thinking that cp’s plugin wasn’t fully fixed until I did a second take and tried building without that plugin enabled. I discovered then by process of elimination (and your post above) that Custom Wizard is now broken. So is the fix in the interim to disable Custom Wizard plugin completely until further notice?

4 Likes

v2, a significant update of this plugin, is being released later today. This issue will be addressed as part of that update.

If you are using this plugin, please hold on updating Discourse for the next 48 hours or so.

If you’ve already updated, I’m sorry to leave you in the lurch, however I have to draw the line somewhere with keeping up the existing version up to date with changes in Discourse while working on a new version of the plugin. Rest assured, relief is coming soon.

13 Likes

Here’s a fix for the issue with jquery.putcursoratend.js

Looks like it’s not being used in the plugin, but was a dependency from the composer component.

Thanks!

3 Likes

Thanks for your patience everyone. v0.2 of the plugin is here :tada:. If you update the Custom Wizard plugin now in /admin/upgrade, you’ll be updated to v0.2.

What’s in v0.2

There are significant changes, so I won’t go over them all here. You can learn more here:

Wizard Settings
Step Settings
Field Settings
Conditional Settings

More documentation, guides and example wizards for common use cases will follow in the coming days.

Migrating from v0.1

There are significant changes in the wizard structure which means that some of your existing wizard settings will not be automatically migrated. If you have been using a wizard on v0.2 please review your settings to check for issues.

To ensure your wizard(s) have migrated to the new structure, save them at least once and check the result. The new data validations in place will ensure non-conforming data is migrated where possible and removed where not.

If you’re using this plugin in production and are worried about migrating, reach out to me directly via pm, and I’ll help you migrate (for free).

Settings changes

Min Trust (minimum trust level) setting has been removed entirely. There is now a wizard-level “Permitted” conditional setting which allows for restricting wizards to trust levels, groups and other permission structures.

Advanced Settings A number of Wizard, Step and Field settings are now “Advanced” settings. This means that they are used in relatively few cases.

Migration issues and bug reports

I’ll be responding to any issues with this new version of this plugin as a priority, so please reach out on this topic, or here: Bug Report

12 Likes

Fantastic work Angus! I’ve looked over all the documentation but still having problems getting an image into a new topic with the post builder, I just see this text. Is this because I’m using s3 for my uploads?

{“id”=>“17099”, “url”=>"//npn.sfo2.digitaloceanspaces.com/original/3X/a/1/a1c2bdd54a169a35e95a4cc7fc95471e3be29ad5.jpeg", “original_filename”=>“DSC_2513 - NPN 1500px 2020.03.07.jpg”, “filesize”=>“422440”, “width”=>“1500”, “height”=>“956”, “thumbnail_width”=>“690”, “thumbnail_height”=>“439”, “extension”=>“jpeg”, “short_url”=>“upload://n506tVd67Ud4VTMlxqt8nIZPTPD.jpeg”, “short_path”=>"/uploads/short-url/n506tVd67Ud4VTMlxqt8nIZPTPD.jpeg", “retain_hours”=>"", “human_filesize”=>“413 KB”}

If I just use the upload step instead of the post builder I get this error in the wizard: <!DOCTYPE html>

1 Like

Why aren’t there many options such as api ?

1 Like

Thanks for the feedback David.

This case is not supported yet. Uploads can currently be used to update user avatars, card backgrounds and profiles. I’ll add handling for this case in the next week.

The API features are (and were) experimental. You need to enable the wizard_api_enabled site setting to use them. I will not be supporting them in the near term. They will likely become a mainstream part of the plugin later in the year.

Some settings are now “Advanced” settings (click the “Advanced” button to view them). One of the pieces of feedback I often received on the previous version of the wizard was being overwhelmed with options. The “Advanced” settings are for relatively rare use cases.

8 Likes

I’ve taken at the relevant code, this is actually supported using dot notation for wizard field interpolation. I’ve also made a few updates (so please update to the latest to get the full benefit) to field interpolation and written a guide on its use.

5 Likes