Dynamic Subscription Duration in Gravity Forms + Stripe (1 Year, 2 Year, CPT Plans)

Hi everyone,

I’m working on a setup where I have a Custom Post Type (CPT) called “Plans”, and each plan has a custom field plan_duration (values like 1 year, 2 years).

I want to create a Gravity Form subscription where the billing interval is dynamically set based on the selected plan’s duration. For example:

  • Plan A → 1-year subscription

  • Plan B → 2-year subscription

Here’s what I’ve tried / considered:

  1. Created a Product Field → Subscription in Gravity Forms.

  2. Created a Stripe Feed for subscriptions.

  3. Tried to dynamically populate the subscription interval from the plan_duration field, but Gravity Forms doesn’t natively allow dynamic intervals in the subscription Product Field.

My questions:

  • Is it possible to dynamically set the subscription interval based on a CPT field in Gravity Forms?

  • Do I need to use custom hooks (gform_pre_submission_filter, gform_stripe_subscription_args) to adjust the Stripe subscription before submission?

  • Are there any best practices or examples for handling 1-year vs 2-year subscription intervals dynamically in Gravity Forms?

Any guidance, snippets, or examples would be greatly appreciated!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.