Is it possible to use a php varible instead of null here "->setFormatter( Format::ifEmpty( null ) )"
Is it possible to use a php varible instead of null here "->setFormatter( Format::ifEmpty( null ) )"
Hi
What I want is to set a standard value when creating a new post in DataTables. I know that I could just write this value here:
->setFormatter( Format::ifEmpty( 1924 ) )
but I want the standard value to be editable in my page for standards or defaults. So I have a PHP varible called $faktor, that I want the setFormatter to take insted of null. Is that possible?
->setFormatter( Format::ifEmpty( $faktor) ) doesn't work.
Any ideas?
Best regards
Claus
This question has an accepted answers - jump to answer
Answers
Yes, it is called a custom setFormatter. You can do anything with it ...
Here is an example:
Thanks a lot, I'll give et try.