Results For: "custom field"

Ace Editor Custom Field

The Ace text editor is an online code editor written in JavaScript. It matches the features and performance of native editors.

This code example...

Pull a dropdown list (select) of other content into a custom field

Use this code in a custom field, to pull a list of other content into a select field. This code uses the jQuery Javascript library in a way that shouldn't...

Password Custom Field

The following code can be used to add a Password field to a content structure, including a Form.

Take the following steps to add a Password /...

Multi-select custom field

This builds on the codeshare Stephen Bell provided for using a custom field with a select. This uses a multi-select and reads back in multiple values...

Pulling a list of content into a custom field

This code will pull a list of content into a custom field and create a select box for each result. Onchange it will set the value of the custom field...

Retrieve All Structure Names on Your System and Store them on a Drop Down List Custom Field

This custom field retrieves all structures in your system and display their names and identifiers on a drop down.

You can then use the name of...

Friendly Slug Custom Field (WordPress Style)

SEO-friendly URLs are a must-have nowadays. They not only help web pages rank better in search engines, but also help site visitors and content managers...

Custom Field - Hiding a Tab based on host

This code is an example of how you can get the host id that a content editor is on, and based on that host ID it will show or hide a tab in the content...

Get the logged in user and see if they have a role

This code will retrieve the user id of the logged in user. It will then check to see if the user has the Cms Administrator role. I used this logic with...

Conditionalized Structure Fields

This javascript code can be used in a custom field as an example of making fields (in this case "Featured Start" and "Featured End") visible conditionally...

Disable Structure Fields in Back-end UI

This javascript, when placed into a custom field, will disable fields listed in the array "fieldsToDisable." making them uneditable by back-end UI users...

Select Field for Frontend REST Forms

The following snippet allows you to add a Select field to a Frontend Form that works with Content REST API. 

  • There are...

WYSIWYG Field for Frontend REST Forms

The following snippet allows you to add a WYSIWYG field to a Frontend Form that works with Content REST API. 

  • The $!{wysiwygField}...

Check if key/value field has content

This should be thought of as the equivalent of $UtilMethods.isSet. Unfortunately, that method always returns true for key/value pairs. So we need to...

Combine multiple structure sources into the same content pull

We have multiple news outlets on campus that ended up being created in different structures. When we wanted to syndicate these news sources onto one...

How to Display Content Type's Fields

On this example we will show how to use Velocity to display the values for each type of field on a content type.

We created a new structure and...

Upgrade to the latest Tomcat 6

The Dotcms 2.x distro is running a bit behind the latest apache tomcat 6 version and while Dotcms does not think that will cause any specific problem...

Displaying Hints on Form Fields

If you want to display a hint for each of your Form fields you can do so by using the following Javascript snipet.

This example uses the Form's...

Parsing a JSON String using Jquery and Velocity

If you have a field on a content type that stores a JSON string, you can parse the string using a combination of Velocity and JQuery.

JQuery ...