Skip to content
Gene Alyson Fortunado Torcende edited this page Apr 11, 2020 · 6 revisions
array(
    'fields' => array(
        'field_1_id' => array(
            'title' => 'Sample Field',
            'description' => 'Its description',
            'type' => 'text',
        ),
        'id_of_2' => array(
            'title' => 'Choose One',
            'type' => 'select',
            'options' => array( 'Candy', 'Chips', 'Chocolate' ),
        ),
        'sample' => array(
            'title' => 'Create a carousel',
            'description' => 'Using multiple images',
            'type' => 'file',
            'multiple' => true,
        ),
    ),
)

Config

Each field is configured using these following keys:

These are all optional but must have at least one key for the field to show

  • title - ''
  • description - ''
  • information - ''
  • type - 'text'
  • default - ''
  • style - ''
  • repeatable - false
  • minimum - 0
  • maximum - 0
  • required - false
  • column - false

Specifics

  • options - array()
    • Select, Radio, Checkbox
    • Color
    • Date
    • Editor
    • File
    • Number, Range
    • Post, Page, User, Term
    • Textarea
  • multiple - false
    • Select, Date, File, Post, Page, User, Term
  • none - false
    • Select, Date, Post, Page, User, Term
Clone this wiki locally