? Pending

User tests: Successful: Unsuccessful:

avatar HLeithner
HLeithner
28 Oct 2021

The hidden input of the SubformField has no id attribute.

Summary of Changes

Add the id attribute to the SubformField

Testing Instructions

Code review and check if subforms still work

Actual result BEFORE applying this Pull Request

No id attribute on the input field of the subform

Expected result AFTER applying this Pull Request

An id attribute on the input field of the subform

avatar HLeithner HLeithner - open - 28 Oct 2021
avatar HLeithner HLeithner - change - 28 Oct 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 28 Oct 2021
Category Libraries
avatar RickR2H RickR2H - test_item - 28 Oct 2021 - Tested successfully
avatar RickR2H
RickR2H - comment - 28 Oct 2021

I have tested this item successfully on c6c5711

Patch works! Also tried to add multiple subform fields to see if the ID gets an extra suffix for the second field.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/35922.

avatar richard67 richard67 - test_item - 29 Oct 2021 - Tested successfully
avatar richard67
richard67 - comment - 29 Oct 2021

I have tested this item successfully on c6c5711

2 fields of type "Subform" in article edit view.

Without PR:

<input name="jform[com_fields][test-subform-field-1]" type="hidden" value="">
...
<input name="jform[com_fields][test-subform-field-2]" type="hidden" value="">

With PR:

<input name="jform[com_fields][test-subform-field-1]" id="jform_com_fields_test_subform_field_1" type="hidden" value="">
...
<input name="jform[com_fields][test-subform-field-2]" id="jform_com_fields_test_subform_field_2" type="hidden" value="">

This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/35922.
avatar richard67 richard67 - change - 29 Oct 2021
Status Pending Ready to Commit
Labels Added: ?
avatar richard67
richard67 - comment - 29 Oct 2021

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/35922.

avatar HLeithner
HLeithner - comment - 1 Nov 2021

Switch to draft because I have to validate the some javascript magic

avatar wilsonge wilsonge - change - 3 Nov 2021
Status Ready to Commit Needs Review
avatar wilsonge
wilsonge - comment - 3 Nov 2021

Swapped from RTC to needs review as it needs more work.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/35922.

avatar Fedik
Fedik - comment - 3 Nov 2021

any reason why it need id?

avatar Fedik
Fedik - comment - 2 Jan 2022

Only purpose of this field is to force Browser to send empty value (we can do the same trick for checkboxes if someone interesting).
It not used by subform.js or anywhere else.

If I right remember the ID is no required for inputs.
You can just close it, or merge as it is.

avatar HLeithner
HLeithner - comment - 27 Jun 2022

This pull request has automatically rebased to 4.2-dev.

avatar joomla-bot
joomla-bot - comment - 27 Jun 2022

This pull requests has been automatically converted to the PSR-12 coding standard.

avatar HLeithner HLeithner - change - 27 Jun 2022
Labels Added: ? ?
Removed: ?
avatar HLeithner
HLeithner - comment - 1 Jul 2022

@wilsonge why does it need more work?
@Fedik I'm not sure but I think I needed it for a component to select the input with an unique identifier

avatar HLeithner HLeithner - change - 1 Jul 2022
Labels Added: ?
avatar HLeithner HLeithner - change - 22 Oct 2022
Labels Removed: ?
avatar drmenzelit
drmenzelit - comment - 22 Oct 2022

Thank you @HLeithner for your proposal.

The maintenance team thinks, that the ID of a field should cover the whole field, not the hidden input only. Could you open a new PR with the changes? Thank you in advance.

Closing this one.

avatar HLeithner
HLeithner - comment - 2 Jan 2023

It's a real pain for consistent, I use javascript to address the value of the subform used in one of my component and that subform is the only field that needs this exception....

avatar HLeithner HLeithner - change - 2 Jan 2023
Labels Removed: ?
avatar HLeithner HLeithner - change - 2 Jan 2023
Status Needs Review Pending
avatar HLeithner HLeithner - reopen - 2 Jan 2023
avatar HLeithner
HLeithner - comment - 2 May 2023

This pull request has been automatically rebased to 4.3-dev.

avatar HLeithner
HLeithner - comment - 30 Sep 2023

This pull request has been automatically rebased to 4.4-dev.

avatar HLeithner HLeithner - change - 24 Apr 2024
Title
[4.0] Add missing id to SubformField hidden input field
[4.4] Add missing id to SubformField hidden input field
avatar HLeithner HLeithner - edited - 24 Apr 2024
avatar HLeithner
HLeithner - comment - 15 Nov 2024

This pull request has been automatically rebased to 5.2-dev.

avatar HLeithner HLeithner - change - 15 Nov 2024
Title
[4.4] Add missing id to SubformField hidden input field
[5.2] Add missing id to SubformField hidden input field
avatar HLeithner HLeithner - edited - 15 Nov 2024
avatar Hackwar
Hackwar - comment - 26 Nov 2024

@HLeithner Are you still working on this? It is still marked as draft.

avatar HLeithner
HLeithner - comment - 26 Nov 2024

I only want to have it, don't need to work on it, if other maintainer see the need to have consistency what should I do?

Add a Comment

Login with GitHub to post a comment