Hi, i was wondering if the following Scenario would be possible:
i have a group field like:
'id' => 'group_id',
'type' => 'group',
'clone' => true,
'fields' => [
[
'id' => 'text_id',
'type' => 'text',
'required' => true,
],
]
and i would like to update the "text_id" settings after the post has been saved, namely, i want to make that field readonly
I tried the following:
the group is wrapped in a field with id 'XXX' and i used rwmb_after_save_post
to update some other field values but it doesnt seem to be possible to update field settings
add_action('rwmb_XXX_after_save_post', function($post_id) {
$group_settings = rwmb_get_field_settings('group_id');
foreach ($group_settings['fields'] as $field) {
if ($field['id'] === 'text_id') {
...
}
}
}, 100);
maybe a function named rwmb_set_field_settings