User tests: Successful: Unsuccessful:
Pull Request for Issues #36967 and #36973.
This PR addresses:
In the admin console:
In the frontend:
Repeat with the Contacts component.
In addition, create a subform custom field for the Contacts component.
Include subform-only custom fields into the subform.
Test the output in the frontend for the subform. The default layout will break the HTML markup.
Go back to each subform-only custom field and set the layout to 'subform' (in the 'option' tab).
The subform should be properly displayed (no more broken dl/dd/dt markup).
Fields render as:
<ul class="fields-container">
<li class="field-entry"> … </li>
<li class="field-entry"> … </li>
</ul>
For com_contact, fields render as:
<dl class="fields-container contact-fields dl-horizontal">
<dt class="contact-field-entry "> ... </dt>
<dd class="contact-field-entry "> ... </dd>
<dt class="contact-field-entry "> ... </dt>
<dd class="contact-field-entry "> ... </dd>
<dt class="contact-field-entry "> ... </dt>
<dd class="contact-field-entry "> ... </dd>
<dt class="contact-field-entry "> ... </dt>
<dd class="contact-field-entry "> ... </dd>
</dl>
Fields render as:
<ul class="fields-container">
<li class="field-entry"> … </li>
<li class="field-entry"> … </li>
<li class="field-group group-[group id]">
<span id="group-[group id]">[group name]</span>
<ul aria-labelledby="group-[group id]">
<li class="field-entry"> … </li>
<li class="field-entry"> … </li>
<li class="field-entry"> … </li>
</ul>
</li>
</ul>
For com_contact, fields render as:
<dl class="fields-container contact-fields dl-horizontal">
<dt class="contact-field-entry [field name]"> ... </dt>
<dd class="contact-field-entry [field name]"> ... </dd>
<dt class="contact-field-entry [field name]"> ... </dt>
<dd class="contact-field-entry [field name]"> ... </dd>
<dd class="contact-field-group group-[group id]">
<span id="group-[group id]">[group name]</span>
<dl class="fields-container" aria-labelledby="group-[group id]">
<dt class="contact-field-entry [field name]"> ... </dt>
<dd class="contact-field-entry [field name]"> ... </dd>
<dt class="contact-field-entry [field name]"> ... </dt>
<dd class="contact-field-entry [field name]"> ... </dd>
</dl>
</dd>
</dl>
For com_contact, an additional layouts/field/subform.php is present to address issues found when contact custom fields are included inside a subform (it fixes the broken markup where dl tags are missing).
Yes, if there is any place where the frontend output of custom fields has been explained.
It will be necessary for the user to select the proper layout when including a contact custom field into a subform. This implies the custom field is only used in the subform.
Status | New | ⇒ | Pending |
Category | ⇒ | Front End com_fields |
@richard67 yes it does.
@obuisard Could you fix the code style errors reported by Drone here? https://ci.joomla.org/joomla/joomla-cms/51568/1/6 Thanks in advance.
Labels |
Added:
?
|
Shouldnt we at least try and be consistent and not have a mix of short and long array
Category | Front End com_fields | ⇒ | Front End com_contact com_fields |
This pull request has automatically rebased to 4.2-dev.
This pull requests has been automatically converted to the PSR-12 coding standard.
Labels |
Added:
PR-4.3-dev
?
Removed: ? |
This pull request has been automatically rebased to 5.0-dev. No new features will be merged into Joomla! 4.3 series. Joomla! 4.4 series is a bridge release to make migration from Joomla! 4 to 5 as smooth as possible.
I know this is an old PR but it looked worth testing. I was rather expecting to have a custom field label look like a label - so a dt rather than a li. This is what it looks like:
Contacts - I see no html errors with/without the patch. With the patch I see this:
But the steps to get here are rather difficult to follow. I was expecting each item to be on a separate line but the source is this:
<dl class="fields-container contact-fields dl-horizontal">
<dt class="contact-field-entry subform-test">
<span class="field-label ">Subform Test: </span>
</dt>
<dd class="contact-field-entry subform-test">
<span class="field-value ">
<ul class="fields-container">
<li><span class="field-entry"><span class="field-label ">Nickname: </span>
<span class="field-value "> Tommy</span></span>, <span class="field-entry"><span class="field-label ">Sport: </span>
<span class="field-value "> Rugby</span></span></li> </ul>
</span>
</dd>
</dl>
So it works but could be better!
This pull request has been automatically rebased to 5.1-dev.
This pull request has been automatically rebased to 5.2-dev.
Title |
|
This pull request has been automatically rebased to 5.3-dev.
Title |
|
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2024-10-29 20:34:45 |
Closed_By | ⇒ | obuisard | |
Labels |
Added:
Feature
PR-5.3-dev
Removed: PR-4.3-dev ? |
Why was this closed? This was a useful improvement.
Does this also solve #36967 ?