⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Field default value



wildfandango

wildfandango
  • profile picture
  • Member

Posted 15 October 2017 - 13:57 PM

Hello again
 
I'm still learning GroceryCRUD  :P
 
I have read a couple of threads about default values in fields (all quite old).
 
I am not clear which is the solcuón that I must use, in my case I simply need that a date type field takes the value of the current date, in add process.
 
the Field type is date type not TIMESTAMP
 
Thanks in advance.

 


cletourneau

cletourneau
  • profile picture
  • Member

Posted 16 October 2017 - 00:21 AM

I would use callbackAddForm, as stated in 

https://www.grocerycrud.com/enterprise/api-and-function-list/callbackAddForm

 

Don't forget to return $data or it won't work :)

 

Carl


wildfandango

wildfandango
  • profile picture
  • Member

Posted 19 October 2017 - 21:48 PM

Thanks again, just what I was looking for!

 

:)