Welcome to the OpenCities help centre. Search for what you're after, or browse the categories.
Can't find what you're looking for? Submit a support ticket and we'll be in touch.

Follow

Field types

avatar of OpenCities Product Team

OpenCities Product Team

Last updated

This is a Developer task

There are different types of fields. When you create your own field, you have to choose one of these types. Each field type has its own unique settings that you can use to customize your field.

Choose a field type from the list to learn more about its customization settings.

Textbox

Textarea

WYSIWYG

Drop Down List

Check box List

Radio button List

List box

Date

Image upload

Document upload

Media upload

Flash upload

List hyperlink

Tree

Tag

Multiple content

Textbox

A textbox field.

A single line free text box that can have a maximum length limit and a regular expression if you want to validate what someone types into the field. You can use Textboxes to input emails, phone numbers, etc.

Options

Maximum length

The maximum length of the value that authors can enter. Includes spaces.

Enable

Enable or disable the field.

Spell checking

Enable spell checking for the field. We recommend you turn this off for fields such as phone number, postal code, etc.

Default value

Value to prefill when a new page is created. Different values can be set for different languages.

Validation regex

A regular expression can be used to validate what someone types into the field. You can use this to make sure that authors enter a value in the expected format. Different regular expressions can be for different languages.

Validation message

After you’ve set up a Validation regex, you can set a custom message to show the author when the entered value doesn’t pass the regular expression. Different messages can be set for different languages.

Textarea

A textarea field.

A multiline free text box that can have a maximum length limit and a regular expression if you want to validate what someone types into the field. You can use a Textarea to input a short description, additional information, etc.

Options

Maximum length

The maximum length of the value that authors can enter. Includes spaces.

Enable

Enable or disable the field.

Spell checking

Enable spell checking for the field. We recommend you turn this off for fields such as phone number, postal code, etc.

New line styling

Choose what happens when someone creates a new line in the Textarea (by hitting Enter).

  • None: New lines will be removed and the text will be combined to show together.
  • New line - BR: A <br/> will be entered to render each line on a separate line.
  • Unordered list - UL: All individual lines will be rendered as an item on a bulleted list
  • Ordered list - OL: All individual lines will be rendered as an item on a numbered list.

Default value

Value to prefill when a new page is created. Different values can be set for different languages.

Validation regex

A regular expression can be used to validate what someone types into the field. You can use this to make sure that authors enter a value in the expected format. Different regular expressions can be for different languages.

Validation message

After you’ve set up a Validation regex, you can set a custom message to show the author when the entered value doesn’t pass the regular expression. Different messages can be set for different languages.

WYSIWYG

A WYSIWYG field.

'WYSIWYG' is an acronym for 'What You See Is What You Get'. A WYSIWYG is a rich text editor with the ability to include images, links, tables, etc and the flexibility to format the content.

Options

WYSIWYG editor options

Enable/disable additional options. Even if an option is enabled, the system will always check if the content author has access to these features. Authors with basic WYSIWYG access will not be able to see the extra options. For more information on roles and permission, go to Using roles created by OpenCities.

Drop Down

A drop down list field.

Check box

A check box list field.

Radio button

A radio button list field.

Box

A list box field.

These fields have a predefined list of values for authors to choose from. Drop Down List and Radio button List only allow content authors to choose 1 option, whereas Check box List and List box allow users to choose multiple options.

Options

Enable

Enable or disable the field.

Options

Set the predefined list of options. You can have a default list of options and/or different sets of options for each site. Each of these options can have text and a value. The text of the option can be changed per language. Authors will only see the text component when they select the option.

Date

A date field.

A date field with options to have a single date, a time span, multiple dates or recurring dates.

Options

Enable

Enable or disable the field.

Default date

Date to prefill the field with when a new page is created.

Timezone

Timezone for the date entered. If the timezone option is enabled under Allow authors to enter, then the content author will be able to change the timezone when they select the date.

Allow authors to enter

Can enable or disable different options for content author to use when they select the date.

Enable ‘end time’ for single date

If you’re using your Date field to enter a single point in time (e.g. a publish date), then you can uncheck this box. If the date can be a time span within the same date (e.g. 10AM-1PM on 1/4/19), check this box.

Image upload

An image upload field.

An upload field where the author can only upload image files. Images are identified based on the extensions configured in the Image content type. Please see [Configure OpenCities content types] for more information.

Options

Max size

The maximum size of image that can be uploaded or selected for this field. The size is in KiloBytes.

Width x height

The maximum width and height of the image that can be uploaded.

Document, Media, and Flash upload

A document upload field.

An upload field where the author can only upload documents, media or flash. These are identified based on the extensions configured in the related content type. Please see Create or edit your own content types for more information.

Options

Max size

The maximum size of file that can be uploaded or selected for this field. The size is in KiloBytes.

A list hyperlink field.

A list of links that can link to content pages and files within OpenCities, or to external content.

Options

Max amount of links

The maximum number of links the author can enter for this field.

Can add manual hyperlinks

Enable this to allow authors to enter external links for the field.

Can edit system hyperlink’s name

Enable this to allow authors to edit the link text for any linked internal pages or files. If disabled, the link text will use the content or the file name.

Can edit system hyperlink’s URL

Enable this to allow authors to edit the URL of any linked internal page or file. This will allow them to include any additional query strings or fragments to the link.

Can edit system hyperlink’s target

Enable this to allow authors to set an internal page or file to open in a new window instead of opening in the same window.

Starting point for contents

Set a specific location in the content tree as the section that authors can select the content page from. Setting this to None will disable content selection for the field.

Starting point for files

Set a specific folder as the section that authors can select the file from. Setting this to None will disable file selection. This is for the files which belong to that group.

Starting point for shared files

Set a specific folder as the section that authors can select the shared file from. Setting this to None will disable shared file selection. This is for the shared files which belong to that group.

Show RSS

Enable/disable the selection of RSS feeds

Tree

A tree field.

A field which can represent a parent-child or category-subcategory relationship. Rendered as a tree field.

Options

Tree

Configure the data tree. A default tree and/or group specific tree can be configured. Right-click on the Root node to start creating the tree. You can add new nodes under each by right-clicking. Each tree node can have different text for different languages.

Value

To edit the value of a node, right-click it and select Edit Value. Type the new value, then Save.

Tag

A tag field.

A field with a list of predefined values that the author can choose from. If they want to use a value that doesn’t exist in the predefined list, they can add their own.

Options

Enable

Enable or disable the field.

Add values

Manage the predefined list of values.

Multiple content

A multiple content field.

A field which allows content authors to enter multiple lots of content. Each piece of content has its own Label/Title. A Label/Title is a single line text box, and content is a rich text editor.

Options

Max number of WYSIWYG areas

Set the maximum number of records the content author can create. Leaving this empty means they author can create any number of records.

Max character limit for the heading field

The maximum character limit of the heading text box. Leaving it empty or setting it as empty means there is no limit.

Label for the heading field

The label to show next to the heading field in the content admin screen for this field.

Spell checking for heading field

Enable or disable spell checking for the heading text box.

WYSIWYG editor options

Enable/disable additional options. Even if an option is enabled, the system will always check if the content author has access to these features. Authors with basic WYSIWYG access will not be able to see the extra options. For more information on roles and permission, go to Using roles created by OpenCities.

Was this article helpful?
0 out of 0 found this helpful