Example:
<?php class SpecialTest extends FormSpecialPage { public function __construct() { parent::__construct( 'Test', '', false ); } protected function getFormFields() : array { return [ 'info' => [ 'type' => 'info', 'label' => 'info', 'raw' => true, 'default' => "0" ] ]; } public function onSubmit( array $data ) { wfVarDump( $data ); return true; } protected function getDisplayFormat() { $useooui = $this->getRequest()->getBool( 'useooui', true ); return $useooui ? 'ooui' : 'table'; } }
When using the form in OOUI mode, the info field will display nothing. In table mode (provide useooui=0) it will display 0.