Hi there
I'm trying to set a field value of a setting page (after clicking a button in a post, all within admin)
I tried to use this action filter via functions.php:
add_action( 'init', function() {
rwmb_set_meta( 'name_of_my_metabox_setting_page, 'my_field', 999, ['object-type' => 'setting'] );
}, 99 );
(999 = test post id value which should be set for this field)
But nothing happens, the (numeric) field on the setting page remains empty.
Is this the right way to do? if so, why it is not working?
and how can this then be implemented to fire after clicking a button (metabox field)?
..is this only possible with JS? if so, I see there is some documentation for the button, but then where you write '// do something' what do I need to call in order to call this hook?
Thanks in advance for some hints
Best regards
François