Re-use a smart field logic
This example shows you how to re-use the logic of your smart field.
Here, we created a fullname
field that concatenates first and last name. We'll create our own function and export it for use elsewhere in our admin backend.
Requirements
An admin backend running on forest-express-sequelize
How it works
Directory: /models
This directory contains the users.js
where the model is defined.
/models/users.js
Directory: /forest
This directory contains the users.js
file where the Smart Field fullname
is declared.
You can now require this module everywhere in your admin backend:
Last updated