You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Testi]
__sql__ = "SELECT * FROM Testo T WHERE T.FKPunto='$KPunto'"
(table 'Testo': fields.ini)
[Testo]
widget:type=ckeditor
passthru=1
everything is rendering as expected when editing a 'Punto' record, but no value is saved in the 'Testi' relationship when clicking the save button, and no new line in the grid appears when clicking on the last cell
If a textarea widget is used instead of a ckeditor widget, like this:
(table 'Testo': fields.ini)
[Testo]
widget:type=textarea
the save button and the new line mechanism in the grid work again as expected.
ckeditor inside a grid might not be currently supported, but could sometimes be useful
The text was updated successfully, but these errors were encountered:
Apparently something goes wrong when transferring the values from the form/widget to the record to be saved.
As a matter of fact, 'beforeSave()' does not know the new values inserted, while 'pushValue()' does.
So I tried to short circuit the builtin transfer mechanism using the 'pouch' that XF provides, like this (in the 'Testi' table delegate class):
function Testi__pushValue(&$record, $el){
//echo '<pre>'; var_dump($el->getValue('Testi')); die();
$record->pouch=$el->getValue('Testi');
}
function beforeSave($record){
$Testi=$record->pouch;
//echo '<pre>'; var_dump($Testi); die();
$record->setValue('Testi', $Testi);
}
and it works, sort of.
I know it's not a solution, but if someone needs a bypass...
In a 1:n relationship managed via a transient field and a grid widget in the main table, like this:
(table 'Punto': fields.ini)
(table 'Punto': relationships.ini)
(table 'Testo': fields.ini)
everything is rendering as expected when editing a 'Punto' record, but no value is saved in the 'Testi' relationship when clicking the save button, and no new line in the grid appears when clicking on the last cell
If a textarea widget is used instead of a ckeditor widget, like this:
(table 'Testo': fields.ini)
the save button and the new line mechanism in the grid work again as expected.
ckeditor inside a grid might not be currently supported, but could sometimes be useful
The text was updated successfully, but these errors were encountered: