User tests: Successful: Unsuccessful:
Nesteds subform
В строке 68 надо суффикс у имени поля поменять с 'X' на '0'.
Тогда вложенные subform (одна в другую) начинают формировать нормальный JSON для записи в БД.
I'm sorry for my English. =D
Pull Request for Issue # .
Status | New | ⇒ | Pending |
Category | ⇒ | Layout |
Simple Joomla 4 plugin (for test).
https://disk.yandex.ru/d/hi6n5Xu4-r7_zQ
See tab "Publishing" (down in fieldset "Metadata") by Article creation or edition.
You have to explain what you tries to fix, your original issue.
The changes here is wrong. And cannot be accepted.
You have to explain what you tries to fix, your original issue.
Try installing the plugin. Link above.
Without the suggested fixes, nested subforms are not correctly stored in the database. As a result, they cannot be used.
I can copy the plugin code here, but there will be a lot of code.
Copy it?
No need whole plugin, enough just XML for subform.
main.xml
<?xml version="1.0" encoding="UTF-8"?>
<form>
<fields name="metadata">
<fieldset name="jmetadata">
<field
name="quest"
type="subform"
label="Поле quest"
description="Описание поля quest"
multiple="true"
buttons="add,remove"
layout="joomla.form.field.subform.repeatable"
formsource="/plugins/content/metatitle/subforms/guestions.xml"
/>
</fieldset>
</fields>
</form>
guestions.xml
<?xml version="1.0" encoding="UTF-8"?>
<form>
<field name="question" type="textarea" cols="40" rows="8" label="Вопрос:" />
<field
name="answers"
type="subform"
label="Поле answers"
description="Описание поля answers"
multiple="true"
buttons="add,remove"
min="3"
layout="joomla.form.field.subform.repeatable"
formsource="/plugins/content/metatitle/subforms/answers.xml"
/>
</form>
answers.xml
<?xml version="1.0" encoding="UTF-8"?>
<form>
<field
name="answer"
type="text"
label="Ответ:"
description="Описание поля answer" />
</form>
yeah, well, I think it the same as #35721
and it already fixed,
You can try to test on latest 4.0-dev branch, or using nightly-builds https://developer.joomla.org/nightly-builds.html
Closed in reason stated above. Thanks for PR.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-10-07 12:25:40 |
Closed_By | ⇒ | Fedik | |
Labels |
Added:
?
|
Don't work.
Before test:
<?xml version="1.0" encoding="UTF-8"?>
<form>
<fields name="metadata">
<fieldset name="jmetadata">
<!-- new code from: https://github.com/joomla/joomla-cms/pull/35726#issue-1014053544 -->
<field
name="subform_parent"
label="Subform Parent"
type="subform"
multiple="true"
buttons="add,remove"
>
<form>
<field
name="test_text"
label="Test Text"
type="text"
/>
<field
name="child_subform"
label="Child Subform"
type="subform"
multiple="true"
>
<form>
<field
name="child_text"
label="Child Field"
type="text"
/>
</form>
</field>
</form>
</field>
<!-- end new code -->
</fieldset>
</fields>
</form>
Пичалька =(
Test with Full_Package.
In some reason Patch_Package is incomplete.
Test with Full_Package.
It's work! =)
Спасибо! ))
google translation