- This topic has 3 replies, 2 voices, and was last updated 7 months, 1 week ago by .
I have a date field (job_update_date) in a cloned group (group_updates). I need to be able to set this field to default to the current date each time a new clone is created as it seems the Today button behaviour is only to highlight entry in the popup calendar and not to actually populate the date field (unlike the time field which populates properly when the Now button is pressed).
This is part of the code so far.
[ 'id' => $prefix . 'group_updates', 'type' => 'group', 'fields' => [ [ 'id' => $prefix . 'job_update_time', 'name' => esc_html__( 'Task Completion Time', 'text-domain' ), 'type' => 'time', ], [ 'id' => $prefix . 'job_update_date', 'type' => 'date', 'name' => esc_html__( 'Task Date', 'text-domain' ), 'clone_default' => true, ],
I'm using Builder if that makes any difference.
What is the best way to achieve this?
- You must be logged in to reply to this topic.