I repost about that, I think the problem with ajax field is when I try to get value in a string (from a parent, I didn't test in the current form but I think there is the same issue). My previous post about that is also with a string I think.
When :
Code: Select all
$field = [123];
$form_field_value = $field;
echo $form_field_value;
Code: Select all
2023-07-31 01:12 USER Warning
Trying to access array offset on value of type int
modules/dashboard/actions/ajax_request.php:118
/index.php?module=dashboard/ajax_request&field_id=456&item_id=0 [AJAX]
and if I try this :
Code: Select all
$field = '[123]';
$form_field_value = $field;
echo $form_field_value;
Code: Select all
[31-Jul-2023 01:13:55 America] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /***/***/***/modules/dashboard/actions/ajax_request.php:118
Stack trace:
#0 /***/***/***/index.php(20): require()
#1 {main}
thrown in /***/***/***/modules/dashboard/actions/ajax_request.php on line 118