1. Home
  2. Docs
  3. Introduction
  4. Json
  5. Fields

Fields

The JSON structure for WpPlugincraft is designed to define sections and field types for a WordPress plugin settings page. Each section, such as google_settings, represents a tab in the settings interface. Within each section, you can specify fields that represent the settings options:

  • Text Field: A single line input for text.
  • Checkbox: A toggleable field, often used for boolean (true/false) settings.
  • Select Dropdown: Provides a list of options from which the user can select one.
  • Color: Allows the user to select a color, typically with a color picker interface.
  • Image: Enables the uploading and selection of an image.

For each field, you define attributes like label (the human-readable name of the setting), type (what kind of field it is), and additional attributes such as options for select dropdowns or checked to indicate if a checkbox is active by default.

This JSON structure enables the creation of a dynamic and customizable settings interface for WordPress plugins. Users can directly edit this JSON to add new sections, change existing fields, or update labels and default values to tailor the settings to their specific needs.

How can we help?