Display data in html format

This example shows you how to implement a smart field that displays HTML.

Here a Movie hasOne movieCharacteristic. On the movies collection, we want to implement a smart field (called characteristics) that will display all the characteristics of a movie.

Requirements

  • An admin backend running on forest-express-sequelize

How it works

Directory: /models

This directory contains the movies.js and movie-characteristics.js files where the models movies and movieCharacteristics are defined.

Directory: /forest

This directory contains the movies.js file where the smart field characteristics is implemented. The smart field returns an html-formatted list of the movie characteristics as a string.

Last updated

Was this helpful?