post by markab on Nov 7, 2021

Hello,

Can anyone help me with an example on how to set the default value of a datetime field to now so that when the add form is opened the current date time is set?

Thanks,

post by johnny on Nov 8, 2021

post by markab on Nov 8, 2021

Thanks…

	$crud->callbackAddForm(function ($data) {
	
		$data['san_created_date'] = date('d/m/Y H:i:s');

		return $data;
	});
1 / 3
Nov 2021