Realtime Validations

The Custom Wizard plugin now has a “Realtime Validations” feature.

Realtime Validations are the ones that kick in as the user is interacting with a field.
Currently, we have a Similar Topics validation, which is available for Text Type fields. Here’s how to enable it.

Similar Topics

It is an implementation of the Your topic is similar to... Composer Dialog for Custom Wizard, especially when using the Text field to create a topic.

image

Steps to Enable
  • In the wizard admin settings, choose the field type Text.
  • Click on the Advanced button, You’ll see a new section called Realtime Validations.

  • The Categories setting allows to restrict which categories should be used to look for similar topics. If left unchanged, the topics will be looked up from all categories visible to the user.
  • Max Topic Age setting allows specifying the max age of the topics being looked for. By default, all the topics visible to the user will be looked up.
  • Position is used to specify whether the dialog should appear Above or Below the field in the wizard.
Notes

The displaying of similar topics depends on these site settings. These apply both to the composer and the Similar Topics validation.

  • min title similar length : Minimum characters a user needs to enter before the topics are looked up.
  • max similar results : Maximum number of similar topics that will be displayed.
  • minimum topics similar : Minimum number of topics that should be present on the site before the similar topics are displayed.
Developer Notes
  • A validation message is shown below the text field when the Similar Topics validation is enabled.

  • The validator has a few states, and each state pertains to a unique a css class and validation message.

    State CSS Class Message Translation Key
    Initial - -
    Typing similar-topics-default realtime_validations.similar_topics.default
    Typing(when categories set) similar-topics-default-categories realtime_validations.similar_topics.default_categories
    No Results similar-topics-no-results realtime_validations.similar_topics.no_results
    Results Found similar-topics-results realtime_validations.similar_topics.results
    Loading similar-topics-loading realtime_validations.similar_topics.loading
    Results Minimized similar-topics-show realtime_validations.similar_topics.show

great feature thanks

@fzngagan Please use the same approach here as in other knowledge topics

  1. Display all details in a wikified post, don’t use hide details.
  2. Use the DiscoTOC plugin to give it a contents list in the right sidebar

@members Generally, please follow these conventions in all #knowledge topics.

Sure, I’ve taken care of that :slight_smile: