Template Field Widths

Quickly set the widths of inputfields in a template.

Adds a "Field widths" field to Edit Template that allows you to quickly set the widths and "required" state of inputfields in the template.

The module also adds a similar field to the settings of Edit Field for Repeater, FieldsetPage and Repeater Matrix allowing you to quickly set the widths and required state of inputfields within the Repeater/FieldsetPage field, or within each Repeater Matrix type.

Note: widths/required are only saved if the edit form is submitted with the "Field widths" field in an open (non-collapsed) state.

Edit template

Template field widths screencast

Edit Field: Repeater

Repeater field widths

Edit Field: Repeater Matrix

Repeater matrix field widths

Required state

Since v0.3.0 you can toggle the required state by clicking the asterisk icon.

Asterisks for required state

Why?


When setting up a new template/repeater or trying out different field layouts I find it a bit slow and tedious to have to open each field individually in a modal just to set the width or required state. This module speeds up the process.

Config options


  • You can set the default presentation of the "Field widths" field to collapsed or open.
    • Widths entered into the "Field widths" field are only applied if the edit form is submitted with the field in an open (non-collapsed) state.
    • "Collapsed" is the recommended setting if you think you might also use core inputs for setting field widths in a template context.
  • You can choose Name or Label as the primary identifier shown for the field. The unchosen alternative will become the title attribute shown on hover.
  • You can choose to show the original field width next to the template context field width.

More modules by Robin S

  • Hanna Code Dialog

    Enhances the use of Hanna tags in CKEditor fields, including the dialog-based editing of Hanna tags.
  • Connect Page Fields

    Allows the connecting of two related Page fields so that changing one updates the other.
  • Minimal Fieldset

    Adds a config option to fieldsets to render them without label or padding in Page Edit.
  • Template Field Widths

    Quickly set the widths of inputfields in a template.
  • Custom Inputfield Dependencies

    Extends inputfield dependencies so that inputfield visibility or required status may be determined at runtime by selector or custom PHP code.
  • Breadcrumb Dropdowns

    Adds dropdown menus of page edit links to the breadcrumbs in Page Edit.
  • Auto Template Stubs

    Automatically creates stub files for templates when fields or fieldgroups are saved.
  • Custom Admin Menus

    Adds up to three custom dropdowns to the main admin menu.
  • Page List Select Multiple Quickly

    Modifies PageListSelectMultiple to allow you to select multiple pages without the tree closing.

All modules by Robin S

Install and use modules at your own risk. Always have a site and database backup before installing new modules.