PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Add dynamic date

  1. I created a form for referrals.. basically a current customer referrs a friend.. The friend gets a notification that so and so referred them to the business ,. they are instructed to print the email and bring it in to redeem.

    I need a way to ad a date that get dynamically populated like 7 days from the day they receive the email...

    I had a sms plugin that would do this.. the person would text pizza to this number and it would text them back a coupon.. if i put in [[7:date]] in the reply body to the text , it would automatically say, this expires on Feb "whatever 7 days is here based on the day they received the text"

    Can this be done with gravity forms??

    Posted 12 years ago on Wednesday February 8, 2012 | Permalink
  2. Hi Scott,

    I'd recommend creating a custom merge tag to handle this for you. Here is a good example of how to create a custom merge tag:

    http://www.gravityhelp.com/forums/topic/math-calculations-on-confirmation-page#post-49109

    And here is the official documentation:

    http://www.gravityhelp.com/documentation/page/Gform_replace_merge_tags

    As part of the custom code to replace your merge tag with the desire value, you can use PHP's strtotime() function and add +7 days to the current date:

    http://php.net/manual/en/function.strtotime.php

    Posted 12 years ago on Monday February 13, 2012 | Permalink
  3. Thanks for the update.... looks complicated :) Might give it a go!

    Posted 12 years ago on Monday February 13, 2012 | Permalink
  4. It's not too bad. Give it a shot! :D

    Posted 12 years ago on Monday February 13, 2012 | Permalink