Child pages
  • HelperOptions
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Table of contents


This helper is used to generate a configuration form, the values of which are stored in the configuration table. Example: the "Preferences" page.

Options declaration

Fields inside [brackets] are optional.
Values between {curly braces} list the possible values for this field.

$this->fields_options = array(
  'general' => array(
    ['title'] => $this->l('Carrier options'),                      // If missing, default is 'Options'.
    ['top'] => $this->l('Text to display before the fieldset'),
    ['image'] => 'url to icon',                                    // If missing will use the default icon for the tab.
    ['description'] => $this->l('Display as description'),
    ['info'] => $this->l('Display as info'),
    'fields' => array(
      'PS_CARRIER_DEFAULT' => array(
        ['title'] => $this->l('Default carrier:'),
        ['desc'] => $this->l('The default carrier used in shop'),
        ['cast'] => 'intval', 
        'type' => {'text', 'hidden', 'select', 'bool', 'radio', 
          'checkbox', 'password', 'textarea', 'file', 'textLang', 
          'textareaLang', 'selectLang'},
        ['suffix'] => 'Display after the field (ie. currency)',    // Only for text or password.
        'identifier' => 'id_carrier',
        ['list'] => array(list do display as options),             // Only for select.
        ['empty_message'] => $this->l('Display if list is empty'), // Only for select.
        ['cols'] => 40,                                            // For textarea.
        ['rows'] => 5,                                             // For textarea.
        ['thumb'] => 'url to thumb image',                         // For files.
        ['is_invisible'] => {true, false}                          // Disable the field depending on shop context.
      'ANOTHER_FIELD' => array(
    'submit' => array()
  'another fieldset' => ...
  • No labels