📝
xoops-modules-cookbook
  • Read me
  • Introduction
  • Templates
  • Database
  • Coding Standards
    • Our Recommendations
      • PSR-12 Style Guide
      • Clean Code
      • Module Structure
  • Best Practices
    • Best Practices
      • Convention over Configuration
      • Add namespaces
      • Add Sample Buttons
      • Add Comment Notification
      • Add Comments
      • How to handle AND/OR in CriteriaCompo
  • Core Classes
    • Classes
      • Key Classes
      • Helper Class
      • Criteria
      • XoopsObject
      • XoopsObject & XoopsObjectHandler
      • XoopsObjectHandler & XoopsPersistableObjectHandler
  • Working with Database
    • Using Criteria classes
  • Common Classes/Traits
    • Common Classes
      • Breadcrumb
      • Configurator
      • Migrate
    • Traits
      • FilesManagement
      • ServerStats
      • VersionChecks
      • ModuleStats
  • Form Classes
    • Form Classes
      • XoopsButtonTray
      • XoopsForm
      • XoopsFormButton
      • XoopsFormButtonTray
      • XoopsFormCaptcha
      • XoopsFormCheckBox
      • XoopsFormColorPicker
      • XoopsFormDateTime
      • XoopsFormDhtmlTextArea
      • XoopsFormEditor
      • XoopsFormElement
      • XoopsFormElementTray
      • XoopsFormFile
      • XoopsFormHidden
      • XoopsFormHiddenToken
      • XoopsFormLabel
      • XoopsFormPassword
      • XoopsFormRadio
      • XoopsFormRadioYN
      • XoopsFormSelect
      • XoopsFormSelectCheckGroup
      • XoopsFormSelectCountry
      • XoopsFormSelectEditor
      • XoopsFormSelectGroup
      • XoopsFormSelectLang
      • XoopsFormSelectMatchOption
      • XoopsFormSelectTheme
      • XoopsFormSelectTimeZone
      • XoopsFormSelectUser
      • XoopsFormText
      • XoopsFormTextArea
      • XoopsFormTextDateSelect
      • XoopsSimpleForm
      • XoopsTableForm
      • XoopsThemeForm
      • XoopsGroupPermForm
      • XoopsGroupFormCheckBox
  • Migration
    • Namespaces/Autoload
  • Configuration
    • ModuleConfiguration
      • Configuration files
  • Testing
    • Testing Checklist
    • Testing
  • About
    • Credits
    • About XOOPS CMS
Powered by GitBook
On this page

Was this helpful?

  1. Form Classes
  2. Form Classes

XoopsFormSelect

PreviousXoopsFormRadioYNNextXoopsFormSelectCheckGroup

Last updated 4 years ago

Was this helpful?

Definition

XoopsFormSelect($caption, $name, $value=null, $size=1, $multiple=false)

Usage XoopsFormSelect is a normal drop-down menu.

Most Important Functions

  • addOption($value, $name="", $disabled = false) - add an option to the select, if no name is given the value carries over. From XOOPS 2.2, $disabled can be set to true in order to make the option non-selectable

  • addOptionArray($options, $disabled=array()) - add options from a value-name pair array. The array's key is the value. From XOOPS 2.2, $disabled can be an array of values that should be disabled

Child Classes

  • XoopsFormSelectCountry($caption, $name, $value=null, $size=1) - Countries

  • XoopsFormSelectGroup($caption, $name, $include_anon=false, $value=null, $size=1, $multiple=false) - Usergroups

  • XoopsFormSelectLang($caption, $name, $value=null, $size=1) - Language selection

  • XoopsFormSelectMatchOption($caption, $name, $value=null, $size=1) - Match ("Starts with", "Ends With", "Equals" or "Contains") selection

  • XoopsFormSelectTheme($caption, $name, $value=null, $size=1) - Theme selection

  • XoopsFormSelectTimezone($caption, $name, $value=null, $size=1) - Timezone selection

  • XoopsFormSelectUser($caption, $name, $include_anon=false, $value=null, $size=1, $multiple=false) - User selection, $include_anon will include the anonymous user if true

Common for all these classes is that they do not need the addOption - options are automatically populated