How to set the default value of a date field to be the value of another field?

3 posts by 3 authors in: Forums > CMS Builder
Last Post: July 11   (RSS)

By andreasml - July 3 - edited: July 3

Hi

I would like to set the default value of a date field (e.g., the date_2 field) to be the date of another field of the same record (e.g., the date_1 field). 

Can something like the following be an option?

<?php echo htmlspecialchars($RECORD['date_1'] ?? ''); ?>

Thanks, 

Andreas

Hi Andreas, 

The date fields don't support PHP content, unfortunately.  Also, the default values are used when a new record is created, and at that point none of the other date fields have set values yet either.

Let me know what you're trying to accomplish and I'll see if I can think of any other approaches.

Dave Edis - Senior Developer
interactivetools.com