Feature request: wizard field "URL (with autosuggest)" for custom wizard

Hey guys

I hope this is the right category: We are planning to add a bunch of product topics dedicated category in our forum.

How could we implement the following to our wizard:

  1. Auto-suggest “product search field” in a custom wizard which searches and picks one single topic based on the title (in wizard editor, preferrably with a per-category picker, so user can only search topics in there)
  2. Display the product topic title in topic view (via custom fields feature it should be possible, as demo’d here, correct?) Scratch that, we won’t dabble in Custom fields for now
1 Like

Hey guys

just a quick bump here!

Basically, we would like the input field to mimic the behaviour of the “Insert Hyperlink” input field in the core composer with the following adjustments:

  • no title input field
  • Auto-suggest results limited to one or more categories (defined in wizard editor fo the resp. field)
  • Pasting external links is allowed
  • Entering non-URL text is allowed

Let me have a think about this and get back to you by tomorrow.

Yup, so this is essentially what the Realtime Validations feature is designed for. Now that it’s fixed, give it a shot for this use case and let us know how you go.

1 Like

Ok let me check! I am not sure if that’s actually gonna cover our use case, but we can see how far we get.

@angus

Wizard editor category picker works, but in the wizard front-end, no similar topics can be found. You can check my test wizard here, type in something like “light”: https://cablogstaging.discoursehosting.net/admin/wizards/wizard/test_autosuggest
There are plenty of topics with that in the title, but zero suggested results.

I’m a little unsure of whether to trust the behaviour on your staging site as there are so many un-related client-side exceptions. Client-side exceptions interfere with the normal operation of javascript. The first step here is to have a properly functioning test environment.

I have tested the functionality myself, in a production environment without exceptions, and it was working as expected.

I will clean up your staging instance later this week @jrgong . I don’t think these messages are related but I agree with Angus that we should have a clean environment first.

2 Likes

Yep, I second that! Thx again guys for your testing and input, I really appreciate it!

2 Likes

Cleaned up the staging instance.

Still not working

EDIT lowering min_title_similar_length (see discourse-custom-wizard/lib/custom_wizard/realtime_validations/similar_topics.rb at main · paviliondev/discourse-custom-wizard · GitHub)

does return a result

Mhh

I Just tried with sanlight term, but no topics suggested.
When I search manually, multiple threads contain the term in the title:

Yup, the plugin respects the standard Discourse similar topics system.

That’s not the same thing :slight_smile:

“Similar topics” are those that appear when you’re typing a title in the composer. And are affected by things like the min_title_similar_length site setting.

We could change that, but that would be a change to the nature of the feature.

Ah ok, then this would be rather a new feature request.

We basically want to create an input field that mimics the core search with autosuggest topic titles.

And when clicking on one of the suggestions, the input field is filled with the URL/link to the suggested topic which can be used for an action for the link to be posted in a new topic etc.

No validation required as we want to allow plain text input as well.

@angus could you make this a paid request and could you send me a quote?