Hi there
My form tries to prepopulate as many fields as possible.
One I don't seem to get to work is a datepicker field:
The other way works as it should:
But the debugger simply shows this field as empty in the load of the form.
Is that because the date format is wrong for the datepicker field, or maybe it can't be prepopulated?
My form tries to prepopulate as many fields as possible.
One I don't seem to get to work is a datepicker field:
$form->data['foedsel1'] = date_format( date_create_from_format( 'Y-m-d', $user->get('cb_birthday'), 'd-m-Y' ) );
The other way works as it should:
$user->set( 'cb_birthday', date_format( date_create_from_format( 'd-m-Y', $form->data['foedsel1'] ), 'Y-m-d' ) ) ;
But the debugger simply shows this field as empty in the load of the form.
Is that because the date format is wrong for the datepicker field, or maybe it can't be prepopulated?