How to add new field in CrudFormFactory based on some field value.Please Help

Code
crud.getCrudFormFactory().setVisibleProperties(
CrudOperation.ADD,
“firstName”, “lastName”,“username”,“role”,“password”);
List roles=new ArrayList<>();
roles.add(“admin”);
roles.add(“user”);

    crud.getCrudFormFactory().setFieldProvider("role",
            new ComboBoxProvider<>(roles));

I want to add new fields “token”,“user id” if role selected is user.Or initially make the fields “token”,“user id” as disabled and later if he selects “user” then it should be enabled how to do this.
Please help. @knoobie

Please do not add (Urgent) to your title. You were already asked once before. All topics are of equal priority and handled by community members on a voluntary basis.

1 Like

okay.Can you please help in this.I have tried various method but they are not working