Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for: Field subform (multiple) produces wrong id #16480

Merged
merged 2 commits into from
Oct 15, 2017

Conversation

Fedik
Copy link
Member

@Fedik Fedik commented Jun 3, 2017

Pull Request for Issue #15187 .

Summary of Changes

The pull fix the way how the script calculate the id for a fields and it's labels.
Also now it should be more close to JFormField::getId result.

Testing Instructions

For test can use next XML (place it in some params form,eg in template or custom module):

<field type="subform" name="subform" label="Subform" multiple="true">
    <form>
        <field type="radio" name="radio1" label="Radio">
            <option value="1">Val 1</option>
            <option value="2">Val 2</option>
        </field>
        <field type="checkboxes" name="checkboxes1" label="checkboxes">
            <option value="3">Val 3</option>
            <option value="4">Val 4</option>
        </field>
        <field type="checkbox" name="checkbox1" label="checkbox" value="1"/>
        <field type="text" name="text1" label="text1"/>
    </form>
</field>

Expected result

After add "new row", check the input/labels id, they should be similar to screenshot:
screen 2017-06-03 17 18 02 936x245

Actual result

ID of the labels is not fixed,
they contain X eg: ..._subform__subformX_..

screen 2017-06-03 17 42 41 904x243

Documentation Changes Required

none

@degobbis
Copy link
Contributor

degobbis commented Oct 11, 2017

I have tested this item ✅ successfully on bf44558
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/16480.

@drmenzelit
Copy link
Contributor

I have tested this item ✅ successfully on bf44558


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

@ghost
Copy link

ghost commented Oct 12, 2017

RTC after two successful tests.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Oct 12, 2017
degobbis added a commit to joomtools/plg_content_jtformulator that referenced this pull request Oct 14, 2017
@mbabker mbabker added this to the Joomla 3.8.2 milestone Oct 15, 2017
@mbabker mbabker merged commit 35cbb1c into joomla:staging Oct 15, 2017
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Oct 15, 2017
@Fedik Fedik deleted the fix-subform-id branch October 15, 2017 18:11
degobbis added a commit to joomtools/plg_content_jtformulator that referenced this pull request Oct 16, 2017
* Update PHP-Version compatibility in composer.json

* Bugfix for showon functionality

* Refactor translation of values

* Change Updateserver

* Add render field for UiKit v2

* Add render form for UiKit v2

* Add support for subforms

* Bugfix JS for multiple subform forms

See joomla/joomla-cms#16480

* Add new Row to validation

* Add CSS-Override for invalid fields

* Remove obsolete files

* Bugfix Updateserver

* Add compatibility for Joomla! 3.8.x

* Update call for showon JS

* Add scroll to top on errormessages

* Add layoutpath override for subforms

* Extended FormField->getLayoutPaths() to get my own paths

* Add UiKit layout to render joomla.form.field.subform.repeatable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants