I have a user registration that includes a trial period (in days). Once the user registers, I want the form to calculate the end of the trial period by adding the value of the trial period field and the created_at date.
Generally I would do this on the fly using PHP, but I cannot find any way to retrieve the created_at value using PHP.
I then tried calculating this by adding [15] + [created-at], but this does not work as the [created-at] shortcode only works in views. Also, I have no clue (and couldn't find any reference) how this would be interpreted, e.g. if [15]=5, how would I tell the calculation that this is days.
The reason why I need to know whether the trial period is done - in PHP - is because I want to redirect the user to a payment page. Any ideas on how to implement this would be appreciated.
I have a similar problem. My app is collecting customer requests. Each request should be resolved within 3 days after submission. I have a Date field for calculating it. Ideally it would be something like:
Start date: [created_at]
Date difference: +3 days
Unfortunately this doesn't work.
Is there any other shortcode that represents created date?
I almost skipped answering your comment. This is a different problem and should be expressed as a new question. Please repost your question as a new issue so more eyes can get on it.
Created_at doesn't exist until the entry is saved so you can't use it in a default value calculation for new entries unless you calculate the due date in the frm_after_create_entry_hook. If you want to calculate a date 3 days from today, use currentdate +3 as the due date's default value.
Ok, that makes sense. Thank you for the heads up.