? Pending

User tests: Successful: Unsuccessful:

avatar Fedik
Fedik
18 Jan 2020

Summary of Changes

Allow to use a custom filter with subform field.
The same as #27561 but for Joomla 4.0

Testing Instructions

Apply patch, create a subform field , somwhere in CustomHTML module, with custom filter:

<field name="test_fields" type="subform" label="test_fields" 
filter="FooBar::filterTest" multiple="true" min="1">
  <form>
    <field name="test_field" type="text" label="TESTFIELD1"/>
  </form>
</field>

Add custom filter class, somwhere in bottom of plugins/system/debug/debug.php:

class FooBar
{
	static function filterTest($value)
	{
		JFactory::getApplication()
		 ->enqueueMessage('Filter works: ' . json_encode($value));
		return $value;
	}
}

Then create a Custom module in backed, and try save it.
Look for the message you got

Expected result

You should get 2 message:
Filter works: {"test_fields0":{"test_field":""}}
and
Module saved

Actual result

You get 1 message
Module saved
that means the custom filter was ignored

avatar Fedik Fedik - open - 18 Jan 2020
avatar Fedik Fedik - change - 18 Jan 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 18 Jan 2020
Category Libraries
avatar wilsonge
wilsonge - comment - 14 Mar 2020

Closing as this is ported to j4 in #28335

avatar wilsonge wilsonge - close - 14 Mar 2020
avatar wilsonge wilsonge - change - 14 Mar 2020
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2020-03-14 11:07:20
Closed_By wilsonge
Labels Added: ?

Add a Comment

Login with GitHub to post a comment