addSettingSections( $this->sPageSlug, // the target page slug array( 'tab_slug' => $this->sTabSlug, 'section_id' => $this->sSectionID, 'title' => __( 'Unsaving Items', 'admin-page-framework-loader' ), 'description' => array( __( 'By using the save argument, you can control whether a field value gets saved or not.', 'admin-page-framework-loader' ), __( 'These form inputs will not be saved while they will be passed to the validation callback methods.', 'admin-page-framework-loader' ), ) ) ); // Fields $oFactory->addSettingFields( $this->sSectionID, // the target section ID array( 'field_id' => 'unsaved', 'title' => __( 'Unsaved', 'admin-page-framework-loader' ), 'type' => 'text', 'save' => false, 'description' => __( 'By passing false to the save argument, the form will not save the field value.', 'admin-page-framework-loader' ), 'attributes' => array( 'readonly' => 'readonly', ), 'value' => date_i18n( 'j F Y g:i:s', time() ), ), array( 'field_id' => 'saved', 'title' => __( 'Saved', 'admin-page-framework-loader' ), 'type' => 'text', 'save' => true, 'description' => __( 'On contrast to the above field, this field value gets saved.', 'admin-page-framework-loader' ), 'attributes' => array( 'readonly' => 'readonly', ), 'default' => date_i18n( 'j F Y g:i:s', time() + 60*60*24 ), ) ); } }