InputfieldForm: description is rendered with item_head markup instead of item_description
Short description of the issue
Contrary to other fields, on InputfieldForm description is rendered with item_head markup instead of item_description.
So the description is displayed as a big <h2> heading, instead of a paragraph.
Expected behavior
Use item_description.
Actual behavior
Use item_head.
Optional: Suggestion for a possible fix
In InputfieldForm, replace this line:
if($description) $description = str_replace('{out}', $this->entityEncode($description), $markup['item_head']);
by this one:
if($description) $description = str_replace('{out}', $this->entityEncode($description), $markup['item_description']);
Steps to reproduce the issue
$inputfieldForm->description("my description");
Setup/Environment
- ProcessWire version: 3.0.240
Since a form is the root parent of all the Inputfields within it the description for the form is supposed to be a headline. The same goes for Fieldset Tabs. This is what item_head is for, and I think those are the only two that use item_head. If you wanted to use a paragraph instead, you could set your own markup for item_head by using InputfieldWrapper::setMarkup().
@hiboudev, any comments? Can we close this?
@hiboudev, closing, post more, or reopen if needed.