Skip to content

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

Merged
mbabker merged 2 commits intojoomla:stagingfrom
Fedik:fix-subform-id
Oct 15, 2017
Merged

Fix for: Field subform (multiple) produces wrong id#16480
mbabker merged 2 commits intojoomla:stagingfrom
Fedik:fix-subform-id

Conversation

@Fedik
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Collaborator

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
Copy Markdown

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
@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.

5 participants