Hello,
I want to create a custom field with the contact creation date filled in. Is there a way to do so?
Thank you
Hello,
I want to create a custom field with the contact creation date filled in. Is there a way to do so?
Thank you
Add a hidden field on your form in Mautic.
Give it a name in the Label
textarea.
Insert <?php echo date('d-m-Y H:i:s'); ?>
which outputs the date (example: 15-11-2019 09:58:11)
or
<?php time(); ?>
which outputs a Unix timestamp (example: 1573829833)
in the Default value
textarea.
It doesnt work with Mautic 2.16. Any other idea?
When saving and opening the hidden field, the default value
is empty. It seems, that Mautic removes the PHP code.