User tests: Successful: Unsuccessful:
Pull Request for Issue #31331 .
This fixes subform value filtering when it have a default value.
Because a default value is a JSON string Form::filterField()
produce:
Warning: Invalid argument supplied for foreach() in <root>/libraries/src/Form/Form.php on line 1572
Add subform field in to any xml in params section, example mod_custom.xml
<field name="subform_test2" type="subform" label="Subform field"
multiple="true"
default='[{"child_field": "Default text field value"}]'
>
<form>
<field
name="child_field"
type="text"
label="Text field"
/>
</form>
</field>
Open the form, remove all subform rows, and save.
Subform field is empty, with zero rows
Subform field should show 1 row of default value
none
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC
Labels |
Added:
?
?
|
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-12-29 08:05:27 |
Closed_By | ⇒ | HLeithner | |
Labels |
Thanks
I have tested this item✅ successfully on d375042
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31399.