Repeating Group Date field being populated with value from parent group date field...

What happens when you add:
return '{yourtable___parent_group_date_element}';
to the repeat group calc element? And "Only calc on save" to "No"?
 
What happens when you add:
return '{yourtable___parent_group_date_element}';
to the repeat group calc element? And "Only calc on save" to "No"?
What I really need is to place a date in the repeatable field based on the parent date
I wanted to use the date in parent date and then calculate the date 5 days prior...
Could I use something like this in a calc element to populate the repeating date field but it could be changed by the user by the date selector or by entering date in manually.

$days_ago = date('m-d-y', strtotime('-5 days', strtotime('{yourtable___parent_group_date_element}')));
return '$days_ago';
 
Last edited:
In that case you should be able to replace your calc element with a date element and put the code in your last post into date element's "default" field and set "Eval" to "Yes".
 
Check what happens with:

$days_ago = date('Y-m-d H:i:s', strtotime('{yourtable___parent_group_date_element_raw}' . ' -5 days'));
return $days_ago;

Also note that quotation marks around variables can cause problems (return '$days_ago')
 
I don't have time to test now, but dump the variables and see if you get the correct dates like:

var_dump('{yourtable___parent_group_date_element_raw}');
exit;

and

var_dump($days_ago);
exit;
 
Last edited:
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top