View Categories

Summary

Table of Contents

Let me share a summary of the available field types. Currently, only a very limited number of field types are supported, but I will add almost all possible field types very soon.

Available Field Types #

TypeDescriptionMultiple ValuesExample Use Case
textSingle-line text inputNoApplication name, message
switchToggle on/offNoEnable/disable features
numberNumeric inputNoMaximum users, timeouts
passwordMasked password inputNoAPI keys, secrets
radioSingle choice from optionsNoMode selection, format choice
selectDropdown selectionYes (with multiple)Method selection, role selection
checkboxMultiple selectionsYesFeature toggles, requirements
tagsMultiple tag-like valuesYesEmail lists, IP addresses
datetimeDate/time pickerNoSchedules, maintenance windows

Notes #

  • All field values are automatically saved to WordPress options using update_option() with the field id as the option name
  • The settings page uses the WordPress REST API for saving settings
  • Only users with the specified capability can access the settings page
  • The React frontend is built from wp-react-panel/build/ directory
  • Make sure to build the React application before using this class