# Section

The Section field provides the ability to set any field below it with an indent.

# Arguments

Name Type Default Description
type string 'section' Value identifying the field type.
indent bool true Flag to set the indentation for all fields that follow. ALWAYS use this. true for a starting section field, false for a closing section field.

WARNING

When using the required argument with the section field, the required statement must be included in both the beginning and end section arrays. Also, the section field cannot be hidden by default. It’s best only to use the required argument with this field when the fold is shown by default.

# Build Config

Build a Custom Configuration →
Changes you make to this form will be reflected in the generated code.
Field visibility requirements.

Redux::set_field( 'OPT_NAME', 'SECTION_ID', array(
    'type' => 'section'
) );

# Example Config

// Begin the section
Redux::addField( 'OPT_NAME', 'SECTION_ID', array(
   'id' => 'section-start',
   'type' => 'section',
   'title' => __('Indented Options', 'redux-framework-demo'),
   'subtitle' => __('With the "section" field you can create indent option sections.', 'redux-framework-demo'),
   'indent' => true 
);

// Other field arrays go between the start and end fields.
Redux::addField( 'OPT_NAME', 'SECTION_ID', array(
    'id'     => 'text-field-in-section-id',
    'type'   => 'text',
    'title'  => __( 'Indented text field', 'redux-framework-demo' )
) );

// End the section
Redux::addField( 'OPT_NAME', 'SECTION_ID', array(
    'id'     => 'section-end',
    'type'   => 'section',
    'indent' => false,
) );