addSettingSections( $this->sPageSlug, // the target page slug array( 'section_id' => $this->sSectionID, 'tab_slug' => $this->sTabSlug, 'title' => __( 'More Complex Form', 'admin-page-framework-loader' ), 'collapsible' => array( 'toggle_all_button' => array( 'top-left', 'bottom-left' ), 'container' => 'section', 'is_collapsed' => false, ), 'repeatable' => true, // this makes the section repeatable 'sortable' => true, ) ); $oFactory->addSettingFields( $this->sSectionID, // the target section ID array( 'field_id' => 'name', 'type' => 'section_title', 'title' => __( 'Name', 'admin-page-framework-loader' ), 'attributes' => array( 'placeholder' => __( 'Enter a name', 'admin-page-framework-loader' ), ), ), array( 'field_id' => 'status', 'type' => 'radio', 'title' => __( 'Status', 'admin-page-framework-loader' ), 'placement' => 'section_title', 'label' => array( 1 => __( 'On', 'admin-page-framework-loader' ), 0 => __( 'Off', 'admin-page-framework-loader' ), ), 'label_min_width' => '40px', 'default' => 1, ), array( 'field_id' => 'text', 'type' => 'textarea', 'title' => __( 'Content', 'admin-page-framework-loader' ), 'rich' => true, 'repeatable' => true, 'sortable' => true, ), array( 'field_id' => 'field_title', 'content' => array( array( 'field_id' => 'field_title_checkbox', 'type' => 'checkbox', 'placement' => 'field_title', 'label' => '' . __( 'Field Title Fields', 'admin-page-framework-loader' ) . '', ), array( 'field_id' => 'field_title_textarea', 'type' => 'textarea', 'before_input' => __( 'Memo', 'admin-page-framework-loader' ), 'placement' => 'field_title', 'attributes' => array( 'cols' => '', ), ), array( 'field_id' => 'text', 'type' => 'text', 'title' => __( 'Normal Nested Field', 'admin-page-framework-loader' ), 'repeatable' => true, 'sortable' => true, ), ), ), array() ); } }