Step 1 Field 1 is a category i’ve created in my 1st action using the name entered into that text field. My 2nd action is trying to create a Sub Category inside that 1st one.
The 1st action runs after Step 1, the 2nd action after step 2 or after the form closes, but it fails to create a category and gives me a html error message at the top of the form.
In console it just says Step 1 failed, but its all step 1 so that’s not very illuminating. I tried with and without the hex and am not sure what else i’m missing.
Btw, is it possible to ask users to upload photos for their category badge? I assume not as it would be in the Actions section category settings, but thought i’d ask anyway.
I undeleted it above this post. It looks to me like it doesn’t accept the ‘step_1_field_1’ input as a parent category because as soon as i remove it then everything works great.
But if it doesn’t accept that, then i’m not sure what else i can add to make it create one category and then one sub category inside that.
It is version 2.5.1 of the plugin. Discourse version is 3.2.0.beta4-dev
I suspect that the technical issue is that Step_1_Field_1 is a text field; however, the Parent Category field is expecting a Category object (not text).
So for this to work, you’d need to create the category and then find a way to make that category selectable within the same wizard. That might not be possible - nor wise!
May I suggest that you separate the tasks (category and subcategory) into two separate wizards? If you need them to be linked together, you can chain them by making the first redirect to the second one.
Looks like chaining them together hits the same issue as the wizard can’t select the category until it has been created and the form actions are pre-set in the form at the time when the wizard is created.
A workaround that would work is if i asked users to ‘confirm’ their school from a drop down of all categories in the 2nd wizard, as the 1st category would have been created bt then. I can’t see a way to select categories in the dropdown option though.
Yeah - you should be able to do that with a Category field. Unfortunately, this will serve up all of the categories on your site, and you won’t be able to narrow it down easily for the same reason.
Have you considered using Tags as an alternative to subcategories? You won’t get hit with this limitation, and they might do the job.
Otherwise, you might just need to make a manual step in there - i.e. make creating schools an admin task that a user requests. This would also help by ensuring your site didn’t get out of control with too many categories (or duplicates).
Its a Kanban fronted project so needs to have the 2 categories, one inside the other
Thanks for your replies. Unfortunately the design brief is that everything for a new user joining has to be automated. I’m not able to ask them or an admin to change any settings
As it looks not to be possible out the box, are there people at Pavillion available to mod a change like that, and what would the price be? Or do you accept PRs to the main codebase?
My guess on how to make that fix would be that the wizard accepts the output of an action as an answer
So if i was able to select the ‘Wizard Action’ of ‘Create a Category’ as the Parent Category
It would either just work, or work with a little code copied over from the Add to Group action, as it already seems smart enough to capture an answer and use it.