Pointing to required fileds in editor screen

HI

Can we point out the field when it is required in editor screen ,Similar to Facebook.
Is it possible to achieve in Cuba.Screenshot (76)

Hi,

There is a Vaadin add-on that can be used in your cuba application - Product Tour https://vaadin.com/directory/component/product-tour-add-on

First of all, create a web toolkit module and create theme extension using CUBA Studio.

Then, add org.vaadin.addons:product-tour:0.2.2 dependency to the web module in Project properties - Advanced.

In order to show custom validation notifications you can override the showValidationErrors method in your window controller:

@Override
public void showValidationErrors(ValidationErrors errors) {
    super.showValidationErrors(errors);

    cancelActiveTour();

    activeTour = new Tour();

    activeTour.addStep(new StepBuilder()
            .withAttachTo(titleField.unwrap(AbstractComponent.class))
            .withTitle("Required fields")
            .withText("Title is required")
            .build());

    activeTour.start();
}

The result will look something like this:

demo

I’ve created a small demo: https://github.com/cuba-labs/rich-validation-messages

1 Like