To add titles between form fields use the type "title", to create a title that will make a separation in between forms use full_block = true, to use the title as part of the same form use full_block = false
addField([ 'type'=>'title', //required 'value' => 'The text to display', //required 'full_block' => false, //optional, false by default 'attributes'=>'', //optional 'blockClass' => '', //optional, the class for the parent container 'blockStyle' => '', //optional, the style for the parent container (without style="") 'title' => '', //optional,value becomes the title when empty 'icon'=> '<i class="fas fa-keyboard"></i>', //optional, keyboard by default 'id'=>'', //optional (value becomes the ID when empty) 'style' => 'color:red', //optional 'class'=>'', //optional 'dataString' => 'data-optional="some value"' //optional ]);
Database-derived title text
The title value is rendered as HTML. Escape database-derived plain text with htmlspecialchars($text, ENT_QUOTES, 'UTF-8') before passing it as the value. For an optional lookup label, append parentheses only when its value is neither null nor empty; build the complete title before escaping it.