Can you provide the CMB2 config/callback you’re using for this so we can try to replicate as close as possible?
Thanks
Hi Michael, my code:
if ( file_exists( dirname( __FILE__ ) . '/lib/cmb2/init.php' ) ) {
require_once dirname( __FILE__ ) . '/lib/cmb2/init.php';
} elseif ( file_exists( dirname( __FILE__ ) . '/lib/cmb2/init.php' ) ) {
require_once dirname( __FILE__ ) . '/lib/cmb2/init.php';
}
Is it?
No, the code where you set up your fields and chose to create some text fields that are repeatable. Likely hooked onto cmb2_init or cmb2_admin_init.
Thanks for replay Michael!
See: https://pastebin.com/8H98kPdT
Example a field problem in line 59.
while my local install re-indexes, just to confirm, this is for the following field, correct?
$sheet1->add_field( array(
'name' => 'Período dos dados solicitados na Ordem de Serviço (O.S.), data final:',
//'desc' => 'field description (optional)',
//'default' => 'standard value (optional)',
'id' => '_periodo_datafinal_1',
'type' => 'text_date',
'date_format' => 'd/m/Y'
) );
Initial hunches are that it’s perhaps saving to meta like expected, but for whatever reasons(dates are difficult), the jQuery UI aspect may be failing to parse/load that value.
Michael, problem found.
Data fields store in wrong format, cmb try solve but lost data, i fix it in my field list and “data_format” paramms.
Thanks for your attention.
Solution:
...
$sheet1->add_field( array(
'name' => 'Período dos dados solicitados na Ordem de Serviço (O.S.), data inicial:',
//'desc' => 'field description (optional)',
//'default' => 'standard value (optional)',
'id' => '_periodo_data_1',
'type' => 'text_date',
'date_format' => 'Y-m-d'
) );
...
-
This reply was modified 8 years, 1 month ago by
Angelo Rocha.
glad i could almost get to help 😀
more glad you got it figured out.