Hello there,
I am new to Forest Admin and have been exploring its customization features; particularly smart actions. I have gone through the documentation and managed to create a basic smart action; but I am running into a few challenges when trying to implement more advanced functionality.
I want the inputs for the smart action to adjust dynamically depending on the role of the logged-in user. For instance, admins would see a full set of options, whereas regular users would only see a limited subset. Is there a way to conditionally display input fields based on user roles or permissions?
I need the smart action to trigger an external API call and wait for the response before completing. While I have set up the API call; I am unsure how to handle error responses gracefully and display appropriate feedback to the user within the Forest Admin interface.
Also, I have gone through this post; https://community.forestadmin.com/t/impossible-to-create-smart-action which definitely helped me out a lot.
I want to add some custom validation logic for the inputs before the smart action is executed. For example, checking whether a particular value exists in the database or whether a selected date is within an acceptable range. Is there a built in way to do this, or would I need to write a custom middleware?
Thanks in advance for your help and assistance.