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.
Wow, this is just awesome, started testing this plugin today and looks really powerful! Thanks a lot for sharing this with the community and keeping it updated @angus and @merefield
Really look forward to conditional rules for the post builder if itās still planned, that would be a fantastic addition and really unlock a lot more potential uses.
Something else that would be cool is an option to override the New Topic button to send users to a wizard. Iāve thought of a few ways this could be implemented with varying complexity.
Global Override āNew Topicā Button
Globally send the user to a single specified wizard, regardless of if they are on the homepage or a category. Looks like either the logic for the category could be sorted in the wizard itself, or a simple wizard like the welcome example could be used to route the user to the correct wizards for their new topic.
The only downside to the global override approach would be that all new posts would have to go through a wizard, but I donāt think thatās a big deal at all. Some wizards could be be more or less a simple composer editor if needed. I imagine this should be possible without it being directly supported in the plugin too, just not really sure how that would be done though.
Override āNew Topicā Button on a per Category Basis
Allow assigning different custom wizards for the New Topic button for:
The homepage (ideally using a simple wizard to route the user to an appropriate wizard for their topic).
Each individual category (if none is assigned, then the regular composer will open).
An alternative, but likely significantly more complex approach, would be keeping the regular composer support when the New Topic button is pressed. But if a user selects a category or subcategory that a custom wizard is assigned to, closing the composer and sending the user to the specified wizard.
E.g. On the Pavilion site the New Topic button is disabled in the open source parent category as well as the bug reports and feature requests child categories. It looks like selecting those categories are also disabled in the composer if I open it from a different child category within the open source parent category. Iām guessing this is to ensure using the wizard for topic creation in those two child categories.
Can you explain what the use case is? I donāt quite understand why youād want to do this.
Thanks for circling back on this. Just to confirm, this is your experience when secure uploads are turned on?
Iāve made a new topic for examples and templates in the custom wizard knowledge base. Iāve added the four wizards we currently use on thepavilion.io
Yes, thatāll be coming at some point Remember you can already interpolate any wizard or user field into the post builder template, which allows for a certain level of conditionality.
This one is more for a seperate theme component. Itās relatively straightforward to do this, you just need to find the route or controller action handler for the the Create Topic button action and use the pluginApi to write your own (which would reroute the user to a wizard url). The current category should be available in that context, so you could make this category specific via a site setting that maps categories to wizard urls.
You know, it seems silly, but I never actually thought about linking the Create Topic buttons in our bug report and feature request categories to their respective wizards. Or if I did, Iāve long forgotten it. Not a bad idea.
Actually I recently commissioned pavilion to create exactly this and it turned out great. I still need to pay for it, so if you want to chip in I wouldnāt complain I opted to make it open source so you are welcome to use it either way. Iāll share it once I get things buttoned up with @merefield. Hereās a post with some screenshots of what it looks like, as you will read I had to pull it from production unfortunately because the wizard has been giving me issues. Edit-added the link
Wow! Iāve been procrastinating to make something like this myself and am absolutely willing to chip in some if it will be available as open source. Please PM details.
āwizardnameā is te name of the Wizard I am trying to create.
So it seems like it tries to load itself while creating, but that doesnāt work because it doesnāt exist yet because it hasnāt been created yet.
Do you know what I am doing wrong?
Edit:
Nevermind, there was a conflict with the discourse-pirate-speak plugin. I removed it, now it works.
I have an issue with the new update. It seems the language is missing on the buttons.
Thanks
Update: It works only on English so I think itās a core issue. Because it sometimes drops my default language and set it English⦠Itās so strange on admin section is half Hungarian and half Englishā¦
Maybe the change from Transifex to Crowdin causing this? Has anyone experienced anything like this?
The wizard you shared is missing key topic fields. You need to tell it what the title, and first post in the topic is. Please read this: Action Settings - Custom Wizard - Pavilion
Do you see the issue elsewhere on your site, besides the custom wizard?
How to stop move uploaded images to tombstone always? It looks like Discourse handle these uploads as unused media and broke all images when move to tombstone⦠I found a setting for this but this feature is useful for topics and posts so i prefer this setting on.
After i use recover from tombstone command it move back these images but few days later disappear again.
So basically the dropdown is blank and it looks like the category-status div is empty. I have the custom wizard working fine on a different community, but its about 10 commits back.
The forum with the broken categories dropdown has custom wizard on this commit: f70170a
The forum with the working categories dropdown has custom wizard on this commit: 290bacc
(function() {
if ('Wizard' in window) {
Discourse.RAW_TEMPLATES['javascripts/topic-list-item'] = requirejs('discourse-common/lib/raw-handlebars').template({"1":function(container,depth0,helpers,partials,data)
Iām not sure what these errors are due to - or is it due to using cdn ?
weird because the wizard when it tests for a while works and then thereās the white wall. It doesnāt help to undo changes.
Uncaught TypeError: Cannot set property ājavascripts/topic-list-itemā of undefined
_ember_jquery-1ed3f3559e6f967733b4088aa729ff7039dff2c09c5a5f787a214b016f58aabc.js:36991 Error while processing route: custom.index
_ember_jquery-1ed3f3559e6f967733b4088aa729ff7039dff2c09c5a5f787a214b016f58aabc.js:38545 Uncaught {readyState: 4, getResponseHeader: Ę, getAllResponseHeaders: Ę, setRequestHeader: Ę, overrideMimeType: Ę, ā¦}
If statement is not working for previous step when i trying to select from other dropdown -> dropdown.
for example 1step , dropdown 1,2,3 then 2nd step i want to choose make new dropdown like:
if step1 dropdown i choose option:1 then dropdown (2step) have options a,b,c / if dropdown(step1) i choose option:2 then dropdown step2 options e,f,g etc
(when 1step is textarea if statement also not working for dropdown)
@angus The command IF works correctly only for a Prefill label (second dropdown) field. For Content label IF does not work if i wants to select from a previous field selected by a user using (first) dropdown
Has anyone ever faced an error like this before? I can create a wizard, but itās an empty page when I try to open it and this error in the dev tools.
Uncaught Error: Could not find module discourse/lib/topic-fancy-title imported from discourse/models/bookmark
at _ember_jquery-1ed3f3559e6f967733b4088aa729ff7039dff2c09c5a5f787a214b016f58aabc.js:74592
at f (_ember_jquery-1ed3f3559e6f967733b4088aa729ff7039dff2c09c5a5f787a214b016f58aabc.js:74561)
at t.module.exports.a. (_ember_jquery-1ed3f3559e6f967733b4088aa729ff7039dff2c09c5a5f787a214b016f58aabc.js:74639)
at t.module.exports.a. (_ember_jquery-1ed3f3559e6f967733b4088aa729ff7039dff2c09c5a5f787a214b016f58aabc.js:74470)
at require (_ember_jquery-1ed3f3559e6f967733b4088aa729ff7039dff2c09c5a5f787a214b016f58aabc.js:74637)
at _ember_jquery-1ed3f3559e6f967733b4088aa729ff7039dff2c09c5a5f787a214b016f58aabc.js:74596
at f (_ember_jquery-1ed3f3559e6f967733b4088aa729ff7039dff2c09c5a5f787a214b016f58aabc.js:74561)
at t.module.exports.a. (_ember_jquery-1ed3f3559e6f967733b4088aa729ff7039dff2c09c5a5f787a214b016f58aabc.js:74639)
at t.module.exports.a. (_ember_jquery-1ed3f3559e6f967733b4088aa729ff7039dff2c09c5a5f787a214b016f58aabc.js:74470)
at require (_ember_jquery-1ed3f3559e6f967733b4088aa729ff7039dff2c09c5a5f787a214b016f58aabc.js:74637)