⚠ 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 forum is read-only and soon will be archived. ⚠


Field default value

field default value

  • Please log in to reply
2 replies to this topic

#1 wildfandango

wildfandango

    Member

  • Members
  • PipPip
  • 24 posts

Posted 15 October 2017 - 01: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.

 



#2 cletourneau

cletourneau

    Member

  • Members
  • PipPip
  • 15 posts

Posted 16 October 2017 - 12:21 AM

I would use callbackAddForm, as stated in 

https://www.groceryc...callbackAddForm

 

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

 

Carl



#3 wildfandango

wildfandango

    Member

  • Members
  • PipPip
  • 24 posts

Posted 19 October 2017 - 09:48 PM

Thanks again, just what I was looking for!

 

:)







Also tagged with one or more of these keywords: field, default, value

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users