Smart action field with "optional" reference

We have a smart action used to create a new subscription for our product users, whenever a new or existing user needs a new subscription our operational team use it.

The field asks for an email to associate to the subscription. Up until now there was no validation on it, we want to add a visual info to the forest user stating if the email exists in database.

I tried first adding a reference on the email field of our smart action but if the email does not exist in DB the submitted value is empty.

So I looked at the change hook to which I associated a custom POST route and I am able to do my check server side, it works but then I have no way of notifying the forest user if the email is found or not.

Is there a way I could do that? Or maybe an optional reference on the field?

Context

Please provide any relevant information about your setup.

  • Package Version: 6.6.2
  • Express Version: 4.17.1
  • Sequelize Version: 5.19.6
  • Project Name: Platform
1 Like

HI @cberez and welcome in our community :champagne: !

A solution could be to simply set the description in the change hook fields.city.description = '🌳 email found 🌳'
I hope this help you :pray:

Hi @vince,
I was thinking about it in a last resort, is there any other way? I’ll do that for now
Thank you!