This is working:
array(
'name' => 'Starting value:',
'id' => "{$prefix}info_starting_value",
'type' => 'text',
'size' => 60,
'std' => "00"
)
This is NOT:
array(
'name' => 'Starting value:',
'id' => "{$prefix}info_starting_value",
'type' => 'text',
'size' => 60,
'std' => "0"
)
Tried single quotes, no difference ;(
This code was working before the last update:
update_post_meta( $p->ID, 'cstm_info_starting_value', '0' );
Now it's not working. I am using Meta Box version 4.7.2
I am using CRON to reset values for many records on a daily basis and now it's not working for some reason.
Could you tell me any quick fix how to save a zero into a text field in Meta Box? std is not as important, but update_post_meta is. I have tried this:
$zero = "0"; update_post_meta( $p->ID, 'cstm_info_starting_value', $zero );
But it doesn't work, but this worked:
$zero = "00"; update_post_meta( $p->ID, 'cstm_info_starting_value', $zero );
But I need 0 and not 00 saved in the db for that field.
Thanks for the info how to solve this problem.