
Hello,
I want to strip_tags from a field (cr_account_name) in GroupX fields with the Plugin Before Store.
GroupX field:
cr_accounts_grpx
Fields in GroupX:
cr_account_name
cr_account_id
My Code:
$grpx = $fields['cr_accounts_grpx']->values;
$i=0;
foreach($grpx as $gx) {
$gx['cr_account_name'] = strip_tags($gx['cr_account_name']);
$fields['cr_accounts_grpx']->values[$i] = $gx;
$name = $fields['cr_accounts_grpx']->storage_field;
$table = $fields['cr_accounts_grpx']->storage_table;
$config['storages'][$table][$name] = strip_tags($gx['cr_account_name']);
$i++;
}
A Var Dump from
$fields before this Code shows me for cr_accounts_grpx->values:


A Var Dump from
$fields after this Code shows me for cr_accounts_grpx->values:

The Var Dump of $name:
cr_accounts_grpx
The Var Dump of $table:
#__cck_store_item_users
So, the strip_tags is working and the Object and the Array are filled correctly. The column cr_accounts_grpx seems ok and #__cck_store_item_users is the table where cr_accounts_grpx is stored.
But after saving the fields from GroupX are empty.
What i'm doing wrong?
Thanks for helping
Papi