Custom Wizard Plugin

@angus indeed. The bugreport form also doesn’t work in IE (This is IE11, as comes with latest Windows 10). same error:

Object doesn’t support property or method ‘padStart’

Shows the same square as above.

1 Like

I’m creating my very first wizard currently.
It shall force the user to present himself. Certain information shall be stored in its profile some are stored in message in the present yourself topic

I come across some difficulties

  1. What is the purpose of

    • Required Data
    • Permitted Params

    The only thing what I see that I can choose fields, which are configured in a step, in the value field
    grafik
    and there is only this what mentiones it

  2. When I add Required Data I get


    I get
    grafik
    When I remove it, the message still appears. Only removing the step and rebuild it, makes it disappear.

  3. there are profile fields I cannot find in profile settings
    Do I need to add them as a custom field?
    How to create and configure Custom User Fields
    grafik

  4. what is the purposes of Topic Attribute when doing Send Message
    grafik
    grafik

  5. what is the purposes of Topic Fields when doing Create Topic
    grafik

  6. can I use route to to route to another wizard, to e.g. accept community rules?
    grafik

    gives me the impression that it can be done. Will restriction like a user must confirm rules (checkbox) to close wizard still apply when doing a simple route to?

  7. how to use Translation key
    I assume
    grafik
    is related to How to add a new language but I have no clue they interact

  8. instead of creating a new topic can I reply to an existing one?
    I would like to have all welcome message in the introduce yourself topic.
    Currently, I need to move them manually

  9. Can I hide/make visible a composer with prefilled content by a button?
    There shall be an option for the user to use the text for Profile - About Me for the reply to the Topic - Introduce yourself.

  10. UI improvements

    1. make it two columns, source and target
      grafik
    2. set reference where keys are explained, e.g. answers to question 4,5 and 7.
  11. Bug - edge doesn’t now show complete form

    1. edge
    2. chrome
3 Likes

is

based on

Are these few lines of code all what need to be added to make it work as shown in the image?

is that a separate plugin ore an extension of Custom Wizard Plugin?
I don’t really get the idea of all this but I would like to understand it.

@PackElend Thanks for this run down. I’ll reply in some more detail later in the week.

3 Likes

Seems to be the same for me, now that I test it.

1 Like

Same for me as well. I’m also trying to force the user to post a topic, and have very similar questions as @PackElend. Thanks in advance for your answers!

Hear anything back on this, or solve the issues on your own? I’m also hoping for a little guidance on this…

I’m going to take a look at this plugin in the next day or so guys. Hold tight.

Required Data Bug

This is now fixed: FIX: required data check · paviliondev/discourse-custom-wizard@9a3506a · GitHub

cc @Fraffel_Media @Joshua_Kogan

Wizard Usage

These are standard user fields. date_of_birth is in “Profile” and title is in “Account”.

You use Topic Fields to set additional (in addition to the title, body, category and tags) properties to a topic (i.e. a pm or normal topic) such as custom_fields.

I haven’t tried that myself, but no reason why it shouldn’t work.

The key field allows you to add locale support for step and field titles and descriptions. You need to add a basic plugin with the relevant locale files if you want to use this feature.

Plugin folder structure

discourse-custom-wizard-locales
  plugin.rb (just metadata)
  config
    locales
      server.en.yml

Server.en.yml

en:
  wizard_1:
    step_1:
      title: "Step 1"
      description: "Step 1 description"
      field_1:
        label: "Field 1"
        descriptioin: "Field 1 description"

The key property should be the parent path to the relevant properties, e.g. “wizard_1.step_1” for the step key, or “wizard_1.step_1.field_1” for the field key.

Not yet.

Yes, use the “Open Composer” action.

MS Browser Bug

@PackElend @carlokok I can’t repro the edge bug in the new chromium based edge for mac. Assuming the issue only occurs on non-chromium based edge browsers, I’m attempting to test Discourse in a virtualized environment on my mac, but having issues gettinig Discourse to work in Edge at all.

To speed up the process, can you file a formal bug report here (using a different browser): Bug Report. Specifically, browser console logs would help here. Thanks.

1 Like

Love you :heart:

Thanks!

1 Like

any chance to make it happen?

could anyone answer the question

This is an amazing plugin.

What would be good, is if you could somehow combine this with events plugin, so someone could use a Wizard form to add an event to the forum.

As an example, we are using a Wizard form now for events, since there is custom information we need for each event (e.g. cost, lecturer name etc.). It’s simply easier to capture that information via a form we create with a Wizard instead of the usual editor in Discourse, which is just a big text box really. However, the only problem is that after a user submits a form with the Wizard and a topic is created, we still need to edit the Event to add the date for the event because the initial form doesn’t have the capability to add an event. So having some ability to add a date for event would be helpful. Hope this makes sense.

@angus i facing some issue when people upload picture and direct showing at action > Create Topic

i would like let my member submit at wizard create topic and upload their picture to introduce themselves so at the upload field i choose “upload” instead of other type of upload option.

because i tried other type upload option , those option cannot direct appear picture at new topic , so end up i choose “upload” and it will showing something like this :slight_smile:

{“id”=>“1180”, “url”=>"/uploads/db1001/original/2X/d/d21a231f5afee5862a7bd5abb7e1ba02f0ef77c7.jpeg", “original_filename”=>“A5F3F4B5-CC25-41DC-BB8E-4F66EFD0F445.jpeg”, “filesize”=>“84377”, “width”=>“740”, “height”=>“626”, “thumbnail_width”=>“591”, “thumbnail_height”=>“500”, “extension”=>“jpeg”, “short_url”=>“upload://tYEgAcdAier5WXmxZurYJCqkYGH.jpeg”, “retain_hours”=>"", “human_filesize”=>“82.4 KB”},

after showing this code i just capture the picture short URL which is : upload://tYEgAcdAier5WXmxZurYJCqkYGH.jpeg and adjust it manually to
and the picture will showing fine …before that , recently 4 days ago i found out this method cannot work anymore , so anyone have this issue too ? if i want direct showing uploaded picture when create a new topic ? and how to manually capture picture URL to showing the pic at my forum ?

1 Like

I’m sorry if this is already answered but I tried my best and couldn’t find it. Is there a way to query all users who have entered a particular value on their wizard and show the users in a list (including their email)?

Example: show all users who have entered India in their country field? (just an example)

Thanks in advance!

1 Like

New features! :tada:

These features have been made possible by the generous support of @economicurtis. They are currently being used on https://community.rstudio.com/ and on https://thepavilion.io.

There will be a number of edge cases to iron out with all of the features listed below, so please make sure you test your own use case in a staging environment before you use it in production.

Integrate APIs

You can now integrate custom wizards with APIs! There are many use cases for this, including integrating email newsletter signup, analytics and surveys, processing payments and much more.

For @economicurtis, we set up an inegration with Marketo using these features.

1. API Admin

There is a new wizard admin section “APIs”. Add authorization and endpoint details for the API you wish to integrate with here.

1.1 Authorization

Each API entry can only have one (or no) authorization method. Basic and OAuth 2 are supported.

If a token has an expiry, and the API follows the OAuth 2 protocol of including expires_in when granting the token, then a job to refresh the token will be automatically created to run 10 minutes before the token expires.

1.2 Enpoints

Each API entry can have multiple endpoints. For each endpoint, you must define a url, protocol, content type, and acceptance codes.

1.3 Logs

Logs are made of the result of all requests made under an API entry, and displayed at the bottom of the entry.

2. Send to API Action

Once you have set up an API in api admin, you can use it in a “Send to API” action on a wizard step. The action allows you to add user data, wizard entries and static data in a request body.

The request is sent upon submission of the step. If the endpoint does not return a specified status code, step validation will fail and the user will not be allowed to proceed.

Permitted Params

“Permitted Params” is a new step setting that allows you to identify custom query params you’d like to save when added to a wizard url. This is particularly useful for analytics, but can also be used in cases when you need to direct a user to another site to complete an action, before they return to complete a wizard (see further below).

Required Data

“Required Data” is a new step setting that allows you to require specific sumibission data to exist before you allow a user to proceed to the next step. Combined with the “Route To” action and “Permitted Params” setting, this allows you to redirect a user to an external site to complete an action before returning to complete the wizard.


@PackElend This should answer your question.

@sfoster We hope to do that at some point, however it won’t happen in the near future unless there’s funding for it, as we’re swamped with work at the moment!

We’ve done some recent work on this. @merefield Can fill you on the details.

4 Likes

that helps but could you illustrated it by an example :blush:?

1 Like

Yes indeed. I’ve submitted a PR, kindly funded, to add a preview to image uploads (using upload type). This is suitable for e.g. avatars. This PR also adds support for the National Flags plugin.

NB It’s now a little confusing because you can upload images in two places. This might be cleaned up/rationalised in a future update.

The PR is currently in advanced test and can be seen in use here

2 Likes