Custom Code Field on Forms

Last Updated: Jun 23, 2021
documentation for the dotCMS Content Management System

Custom fields are supported by The Form Builder Tool.

Custom field are sometimes required when dynamic content selections are desired on the content form. For example, a webmaster may want to provide a dynamically limited list of cities that are located within a certain state that the form contributor has just selected. By using a custom code field, the select list of cities could change as the form contibutor selects a particular state. Use of custom code fields is a powerful way to provide dynamically responsive form fields.

Some javascript handling is required to display values in custom fields on the front end form. The following steps show how to use a custom code field in Form Builder. The sample code below can be placed in a custom code field named "source", which allows the front end content contributor to choose a host from a multi-select list that is dynamically created from existing hosts in the system:

```html ```

On this page

×

We Dig Feedback

Selected excerpt:

×