Field Settings

Starting with Simple Grids & Tables 1.7 you can manage each Simple Grid column's settings directly in the ExpressionEngine control panel when creating your Simple Grid field. A dropdown menu is available where you can add edit the settings with YAML.

Why YAML? Considering the settings for each field type is a fairly basic key > value pair, YAML makes it very straight forward to manage the settings without adding a complex user interface.

Supported settings

Below is a list of field types and their default options that are supported by Simple Grid. Other available options values are noted next to the option after the # code comment. If you only need to set a single option on a field, you do not have to include all options. For example, if you just need to change the text direction of a Text field, just add field_text_direction: 'rtl' to your settings field.

Color Picker

allowed_colors: 'any' # or 'swatches'
colorpicker_default_color: ''
value_swatches:
  - '#B52E2E|red'
  - '#30599E|blue'
  - '#16A224|green'

# value_swatches do not have to have a label, the following is also valid:
value_swatches:
  - '#B52E2E'
  - '#30599E'
  - '#16A224'

Date and DateTime Fields

No config override options available

File Field

allowed_directories: '' # [int] (ID of upload directory)
field_content_type: 'all' # 'image'
num_existing: 0 # [int]
show_existing: 'y' # or 'n'

Textarea

field_ta_rows: 6 # [int]
field_show_formatting_btns: 'n' # or 'y'
field_text_direction: 'ltr' # or 'rtl' 

RTE Field (EE7+ only)

defer: false
toolset_id: null // Will use the default toolset if not defined

Text

field_content_type: 'all' # numeric, integer, or decimal
field_show_file_selector: 'n' # or 'y'
field_text_direction: 'ltr' # or 'rtl'
field_maxl: 256 # [int]
field_show_fmt: 'n' # or 'y'
field_fmt: 'n' #or 'y'

Toggle

field_default_value: 0 # or 1

URL

url_scheme_placeholder: 'https://'
allowed_url_schemes:
  'http://': 'http://'
  'https://': 'https://'
  '//': '// (Protocol Relative URL)'
  'ftp://': 'ftp://'
  'mailto:': 'mailto:'
  'sftp://': 'sftp://'
  'ssh://': 'ssh://'

Last updated