Fixed EOT "missing rp attribute" error

I am trying to get my fixed registration to work and I keep getting this error:

“Invalid form configuration. Missing “rp” attribute. The Regular Period. Must be >= 1.”

This is the code I am using:

[php]$now = strtotime(‘now’); // The time now (in seconds). $fixed_eot_time = strtotime(‘31 March 2021’); // Future time (in seconds). $days_until_fixed_eot_time = round(($fixed_eot_time - $now) / DAY_IN_SECONDS); [/php]

[s2Member-Pro-Stripe-Form level=“1” ccaps="" desc="$35 USD - 2020 Season, ending March 31 2021" cc=“USD” custom=“www.phillymtcc.org” ta=“0” tp=“0” tt=“D” ra=“35” rr=“BN” rt=“D” rp="[php]echo esc_attr($days_until_fixed_eot_time); [/php]" coupon="" accept_coupons=“0” default_country_code=“US” captcha=“0” /]

I read all of the related issue and nothing is working. Any suggestions

Hi Bill.

Is that PHP line exactly the way you have it on your site, or did you compact it for the post here? I see that most would seem to be commented out after the first double slash when you collapsed the lines into one.

In that case, $days_until_fixed_eot_time would not have a value at the point where you use it in the shortcode, which may be what’s causing that warning message.

Try instead:

[php]
$now = strtotime(‘now’); // The time now (in seconds). 
$fixed_eot_time = strtotime(‘31 March 2021’); // Future time (in seconds). 
$days_until_fixed_eot_time = round(($fixed_eot_time - $now) / DAY_IN_SECONDS);
[/php]

And if your PHP shortcode doesn’t do multiline, or you don’t want it for some reason, just try removing the comments.

[php]$now = strtotime(‘now’); $fixed_eot_time = strtotime(‘31 March 2021’); $days_until_fixed_eot_time = round(($fixed_eot_time - $now) / DAY_IN_SECONDS); [/php]

I hope that helps. :slight_smile:

That worked. Thank you!

1 Like