Custom Wizard Plugin


#63

Hi @angus

There is a custom field in my site with name myself which is a textbox

I’m on latest discourse + latest custom wizard plugin.

Its not letting me update this custom field.
(I tried updating about us and that works for me - I tried this to make sure I’m doing things right)


(Angus McLeod) #64

It’s not working because User Field names do not map onto User Custom Field names.

The concept of the “User Field” is broader than “User Custom Fields”, and involves various tables in the database. “User Custom Fields” refers to a single table in the database - user_custom_fields - which the User Field functionality uses.

Behind the scenes User Fields are assigned a User Custom Field according to this naming system: user_field_${field_id}.

In your case the myself field is probably assigned the user custom field user_field_1 (assuming that’s the first user field you made).

Put user_field_1 into the User Custom Field input in the Profile Field action and it should work.

It’s definitely a bit confusing for the end user. Maybe I’ll also show a list of the User Field names (which would map onto the proper User Custom Field names), in addition to still allowing direct entry of User Custom Fields (which is necessary for any User Custom Field that’s not part of a User Field)


#65

I can confirm this using the Data Explorer Plugin right?


(Angus McLeod) #66

Yup. SELECT * FROM user_fields and get the field id

or even better, just SELECT * FROM user_custom_fields to see the fields themselves


#67

Awesomeness!!

I will test it out and let you know.
As always, you’re super quick at responding/clearing our queries.
Appreciate your help and assistance.


(Adrianbblk) #68

Nice work. Thank You.

One little suggestion, the background should be set to stay responsive.


#69

i would relay like if you could add date and datetime fields to this awesome plugin.

Is it not possbile to use userfields in Custom title?
image
does not work for me :disappointed_relieved:

Edit: Dont know this is a bug. Linking the wizzard always getting a 404 at first call. After Refresh the wizzard shows up. Using copy & paste also works for me. Its only if I link it in a post. Iam using the latest version of discourse v2.0.0.beta4 +56
Edit2: Ok seems more a general problem und is not plugin related, sorry


(Angus McLeod) #70

I’ll add it to my list. Perhaps in the next week or so.

I’ll take a look at this in the next few days

This happens because the Custom Wizard app is, like the Discourse setup wizard (in fact it is the same app as the Discourse setup wizard), a seperate Ember app. I’ve been meaning to add a workaround for this so that if behaves as you’d expect. I’ll do so today or tomorrow.


(Angus McLeod) #71

This is will work now.

e.g.


#72

Thank you, that was realy fast.


(Lee Strickland) #73

Hey I’ve had an idea I’ve been trying to hire people to develop a plugin… but honestly this plugin almost does it for me. I could create a custom wizard that would do most of what I needed if it could add input into a single post on the top of the topic in like a system generated topic post. Ideally it would be in table format but that’s pretty easy to accomplish via markdown I think.
Here’s a link to it: Register Plugin
I know this wouldn’t do for the verification side of things but if I could just make a wizard they can click to add lines to a register post would work pretty good.

Short version:
It would be awesome if a wizard could add its data to an existing post.
It would be super awesome if we could use formatting to make “self expanding” tables of that information


(Angus McLeod) #74

I have an idea of what you’re talking about, but I’m still a little confused about the overall goal you’re trying to achieve here :slight_smile:

What’s the most straightforward description of the use case? I read your marketplace post, but I don’t understand your overall goal.

As you alluded, there a lot of different ways the kind of thing you’re talking about can be implemented, particularly within a highly customisable system like Discourse. If I understand your overall goal, it will make it easier to understand how to help you.

Why does the post need to be existing? Why not just use the Custom Wizard plugin to take the initial data entry. You could then post that data entry in a topic if you wanted to.

Who is meant to consume this information? Why does it need to be in a post / topic?


(Lee Strickland) #75

I guess the topic could be created by the wizard. It doesn’t have to be pre exiting. The only important part is adding all the data collected in a table format.

Use case: The Finance Committee keeps a secondary register on their platform for accountability. They would prefer it in one post and relatively formatted. New registers would need to be opened or closed and having a single category for this with only a topic per register would be good.
It’s not intended as a primary document but a place to have an accountability record that would be reconciled vs the actual legal financial records.


(Angus McLeod) #76

You could use the Custom Wizard Submissions, which contains the data entered in a wizard, as well as the username and a timestamp for when the wizard was submitted, in a table.

E.g.


(Anton) #77

Markdown newlines issue:

It should follow the global setting traditional markdown linebreaks.


(Anton) #78

Field description:

  1. Does not align with the field Label.
  2. Рas no padding and probably needs a smaller font
  3. If word-wrapped, looks bad. Maybe best to put under the field label?


When no translation is available, should English be shown by default?


(Angus McLeod) #79

Thanks, I’ll address both issues in the next two days.


(Lee Strickland) #80

RE: Your comment showing custom wizards submissions page
Can I somehow automatically get that output to a post/topic in that format? Cause that would do exactly what I wanted. I can have a custom wizard link for them to enter, and then have the table of results.


(Angus McLeod) #81

@meglio

  1. Newlines. This was an overly general CSS rule for p elements:

    remove overly general description p style · angusmcleod/discourse-custom-wizard@e674617 · GitHub

  2. Field description. Yes, rules added for the other field types caused this. The description for all field types should be aligned properly now. It needs to be above the input as it can be used for a variety of purposes beyond helper text for the input itself (which does normally go below the input).

    Field description styles are off · angusmcleod/discourse-custom-wizard@4b4ed53 · GitHub

  3. Translation fallback. This one requires a change to core Discourse. I’ve made a PR:

    Add wizard_js to translations that can be overridden from a plugin by angusmcleod · Pull Request #5741 · discourse/discourse · GitHub

    @meglio Update: My PR was merged so this should work now.

That’s possible but you’ll need to hire someone to do that specific task as it’s a bit outside the scope of this plugin. It should be pretty straightforward as the structure is already there. The key will be in getting the rendering in a post right.


(Lee Strickland) #82

I will have the ones i am talking with from #marketplace reference this as well if you don’t mind. I want them to make it public as a term. I’ve been exploring hiring on the marketplace already so this whole thing helps me figure it out. Thanks