Create a forms.xml with a spacer (no hr) and e.g. a list, both with label and description.
Render the forms.xml.
Both spacer and list fields should use .hasPopover class, and should have similar styled tooltips.
Spacer field has incorrect style because it uses .hasTooltip instead.
J3.8.4,
This is because /libraries/joomla/form/fields/spacer.php does not use the standard FormFields.php getLabel and renderField methods but instead has its own methods. IMO the getLabel method should limit itself to handling hr="true" and call parent.getLabel for anything else.
Labels |
Added:
?
|
Category | ⇒ | Code style |
Priority | Medium | ⇒ | Low |
Category | Code style | ⇒ | Code style Libraries |
The use case is that the spacer is essentially a label without a field, and my form uses lots of labels with tooltips including the spacer.
The tooltip on the spacer works, but looks very different - and this is because unlike every other form field type, the spacer form field does not use the parent getLabel method but does its own thing and does it differently.
There is no point (IMO) in having a tooltip on an "hr" version of spacer, so this is an exception.
Status | New | ⇒ | Discussion |
@Sophist-UK will you be able to submit a pull request for this?
Status | Discussion | ⇒ | Information Required |
@brianteeman Sorry Brian - I looked at it and how we do tooltips on every other field type and couldn't easily spot how to do it.
However, if you can create the database shim discussed in #19367 and needed for a J4 version of that PR, then I will take another look at this issue and spend the time trying to do a PR for it.
Status | Information Required | ⇒ | Discussion |
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-05-26 20:15:55 |
Closed_By | ⇒ | Quy |
Closed_Date | 2018-05-26 20:15:55 | ⇒ | 2018-05-26 20:15:56 |
Closed_By | Quy | ⇒ | joomla-cms-bot |
Set to "closed" on behalf of @Quy by The JTracker Application at issues.joomla.org/joomla-cms/19604
PR #20584
What is the usecase for having a tooltip/popover on a spacer?