Skip to main content

Creating custom fields

Brightspot renders the standard field types in the content edit form as described in Field types. You can customize a field’s rendering using a servlet, and annotating the field with the path to the servlet.

showLineNumbers {6}
1
import com.psddev.cms.db.Content;
2
import com.psddev.cms.db.ToolUi;
3
4
public class Video extends Content {
5
6
@ToolUi.InputProcessorPath("/custom/videoPreview.jsp")
7
private String videoPreview;
8
9
}
  • 6. Replaces Brightspot’s default rendering of the string field videoPreview with output from the servlet at /custom/videoPreview.jsp.

See also: