latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Mandatory custom field before upgrade

Home Forums Community Forum Mandatory custom field before upgrade

This topic contains 14 replies, has 3 voices. Last updated by  Cristián Lávaque 4 years, 8 months ago.

Topic Author Topic
Posted: Tuesday Apr 17th, 2012 at 1:55 pm #11023
Christian
Username: krikko89

Hello there,
I have a Pro Form for Free Users, I would like to give them the opportunity to upgrade filling one more mandatory custom field that should be displayed in the Pro Forms for Level 1 Users.
I set up the field as mandatory just for level 1 users but it is not displayed in the upgrading form.

How can I solve? Thanks

  • This topic was modified 4 years, 8 months ago by  Christian.

List Of Topic Replies

Viewing 14 replies - 1 through 14 (of 14 total)
Author Replies
Author Replies
Posted: Wednesday Apr 18th, 2012 at 6:06 am #11089

Hi Christian.

The thing is that the profile fields are only shown on registration or profile forms. The upgrade is a checkout form, neither of the others, that’s why the profile fields are not shown there. http://www.s2member.com/forums/topic/two-separate-registration-forms/#post-9871

We’re working on improving this, though.

Posted: Friday Apr 20th, 2012 at 9:33 am #11373
Christian
Username: krikko89

Thanks for your reply, it’ s quite easy with css to show the input I need. Is there anyway to check if that input is filled, before checking out?

thanks

Posted: Friday Apr 20th, 2012 at 11:58 am #11393
Christian
Username: krikko89

I managed to check if it is filled, but the inserted value is not kept after the checkout. If there a way to force S2Members to save it? Thanks

Posted: Friday Apr 20th, 2012 at 11:17 pm #11445

Sorry, Christian, but I’m a bit confused. Did you add a field to the pro-form and now you’re trying to validate the input? What pro-form is it? How did you add the field? Thanks!

Posted: Tuesday Apr 24th, 2012 at 2:24 pm #11722
Christian
Username: krikko89

Hi Cristián, that one is the pro-form for level 1. If your user is logged, he can see the pro-form with all the field filled up, if you have a custom field that is mandatory just for the level 1, you can see that input in the code with a property: disabled= “disabled”. With javascript you can remove it so it will be displayed, and also with javascript you can set it as required. So everything seems working properly, because you cannot checkout until you don’ t fill every field, but then after the checkout my custom field is not updated. I just want to find a way to update it on the check out.

Thanks

Posted: Tuesday Apr 24th, 2012 at 6:53 pm #11770

So you have a field that in the admin area is not set as required, but you changed it to required using JavaScript on the front? Did I understand correctly?

Posted: Thursday Apr 26th, 2012 at 9:39 am #11934
Christian
Username: krikko89

I have a custom field that is set as required in the admin area, but because it’ s a custom field, it’ s not displayed on the checkout to upgrade. It appears as disabled in the checkout page(when the user is already logged and wants to upgrade). It’ s displayed on the regular form, for a new user registration.
I changed the disabled propery to show it using javascript.

Posted: Friday Apr 27th, 2012 at 3:45 am #12021

Oh, ok. Yeah, that’s what I understood and I replied to first, but then I got confused by your next post and that’s why I asked for more details.

Like I said, the upgrade pro-form doesn’t include custom profile fields, it’s just a checkout form. The signup pro-form, on the other hand, is checkout but also registration, which is why it includes the profile fields.

But I took note of your request and I’m adding it to the features list to add to s2Member. Hopefully it’ll make it into a future release soon. :)

Posted: Friday May 4th, 2012 at 5:35 pm #12611
keyhanjun
Username: keyhanjun

Request:
I highly second this request. Please add this feature to use our self defined “Custom Registration/Profile Fields” in all pro forms asap. ;)

Question:

Since it is not possible right now can you please explain how you got this checkbox (single) with the content: “Yes, I want to receive updates from s2Member® via email!” under the “Checkout Now” section on this page?

https://www.s2member.com/unlimited-site-co/?s2-ssl=yes

You should see it when you are logged in & still do not have bought/upgrade it.

That would be a nice workaround in the meantime if I could change it to: “Yes, I have read & agree to these Terms & Conditions”. ;)

Thanks.

  • This reply was modified 4 years, 8 months ago by  keyhanjun.
  • This reply was modified 4 years, 8 months ago by  keyhanjun.
  • This reply was modified 4 years, 8 months ago by  keyhanjun.
Posted: Friday May 4th, 2012 at 11:53 pm #12627

For the email opt-in you have a setting here: [hilite path]Dashboard -› s2Member® -› API / List Servers -› Registration Double Opt-In Box[/hilite]

For the T&C agreement, this should help: http://www.primothemes.com/forums/viewtopic.php?f=36&t=2778

Posted: Saturday May 5th, 2012 at 7:24 am #12661
keyhanjun
Username: keyhanjun

Thanks for you quick reply. ;)

In your mentioned thread s_d_p said:

Aha. The custom field DOES appear on my registration form for my site. But this is not the solution to my questions. I want to add a custom field (terms/conditions) to my PRO FORM when a user buys access to a specific page/post. So I guess I’m restating my question: can I add a custom field to my pro form?

This is exactly what I am trying too.

Jason Caldwell answered to him:

What you CAN do though, is create a custom template for Specific Post/Page Access, and build a checkbox for T&C into your template. Then specify your custom template in the Pro Form Shortcode for s2Member.

[s2Member-PayPal-Pro-Form ... template="my-template.php" /]

( This Shortcode is abbreviated for clarity in this regard )

Is it possible to modify the PayPal® and/or Authorize.Net® Pro Form templates?
Usually not necessary. But yes, if you really need to. Please check your /s2member-pro/includes/templates/forms/ directory. You can take the default templates, and place some ( or all of them ) into your own WordPress® theme directory. s2Member Pro will automatically find your custom templates there. By placing custom templates into your theme directory, you can be sure they won’t get overwritten in a future upgrade. Either that, or you can just use the default templates like they are, and customize them with your own CSS rules inside the Stylesheet for your WordPress® theme ( i.e. style.css ). If you’re using a PriMo Theme ( for instance, the s2Clean Theme ), check your Theme Options Panel, under: Custom CSS / Style Sheet.

So, in your case, take this file:
/s2member-pro/includes/templates/forms/paypal-sp-checkout-form.html
Make a copy in your WordPress theme directory and modify it however you like. If you rename the template file, be sure to specify the new name in the template=”” Attribute of your Shortcode.

Ok I will follow this tip. Seems no problem. :)

Then s_d_p asked this:

This is great. Exactly what I was looking for. One follow-up question…
I need to make my “Terms and Conditions” checkbox mandatory. Can you point me to the script that handles the form? (The template file has a %%action%% shortcode)

Jason Caldwell answered:

Very welcome.
Add an submission handler to the Pro Form.

Something like this at the bottom of your template file perhaps:

<script type="text/javascript">
(function($)
    {
        $('form#s2member-pro-authnet-sp-checkout-form').submit (function()
            {
                if (/* Run your conditional here. */)
                    {
                        alert('Please check the box that you agree!');
                        return false;
                    }
                else
                    return true;
            });
    })(jQuery);
</script>

Question:

Can you please give an example of the needed syntax of this mentioned “/* Run your conditional here. */” ?

I guess the conditional logic I would need would be:

if the user has not checked the Terms & Condition box >>> show the alert / else >>> do not show the alert

Thanks. ;)

  • This reply was modified 4 years, 8 months ago by  keyhanjun.
  • This reply was modified 4 years, 8 months ago by  keyhanjun.
Posted: Saturday May 5th, 2012 at 2:14 pm #12682

I’m glad that helped. :)

I don’t know JavaScript, so I can’t help you there, but basically you’d be checking if the T&C box is checked or not to decide whether to show the message or submit the form.

Posted: Sunday May 6th, 2012 at 7:59 am #12755
keyhanjun
Username: keyhanjun

Finally I succeeded! :)

Here is the code I modified of the file “paypal-sp-checkout-form.php” which I copied in the root folder of my theme:

<?php
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
	exit("Do not access this file directly.");
?>

<form name="mailer" id="s2member-pro-paypal-sp-checkout-form" class="s2member-pro-paypal-form s2member-pro-paypal-sp-checkout-form" method="post" action="%%action%%">
	
	<!-- Response Section ( this is auto-filled after form submission ). -->
	<div id="s2member-pro-paypal-sp-checkout-form-response-section" class="s2member-pro-paypal-form-section s2member-pro-paypal-sp-checkout-form-section s2member-pro-paypal-form-response-section s2member-pro-paypal-sp-checkout-form-response-section">
		<div id="s2member-pro-paypal-sp-checkout-form-response-div" class="s2member-pro-paypal-form-div s2member-pro-paypal-sp-checkout-form-div s2member-pro-paypal-form-response-div s2member-pro-paypal-sp-checkout-form-response-div">
			%%response%%
		</div>
		<div style="clear:both;"></div>
	</div>
	
	<!-- Checkout Description ( this is the desc="" attribute from your Shortcode ). -->
	<div id="s2member-pro-paypal-sp-checkout-form-description-section" class="s2member-pro-paypal-form-section s2member-pro-paypal-sp-checkout-form-section s2member-pro-paypal-form-description-section s2member-pro-paypal-sp-checkout-form-description-section">
		<div id="s2member-pro-paypal-sp-checkout-form-description-div" class="s2member-pro-paypal-form-div s2member-pro-paypal-sp-checkout-form-div s2member-pro-paypal-form-description-div s2member-pro-paypal-sp-checkout-form-description-div">
			%%description%%
		</div>
		<div style="clear:both;"></div>
	</div>
	
	<!-- Coupon Code ( this will ONLY be displayed if your Shortcode has this attribute: accept_coupons="1" ). -->
	<div id="s2member-pro-paypal-sp-checkout-form-coupon-section" class="s2member-pro-paypal-form-section s2member-pro-paypal-sp-checkout-form-section s2member-pro-paypal-form-coupon-section s2member-pro-paypal-sp-checkout-form-coupon-section">
		<div id="s2member-pro-paypal-sp-checkout-form-coupon-section-title" class="s2member-pro-paypal-form-section-title s2member-pro-paypal-sp-checkout-form-section-title s2member-pro-paypal-form-coupon-section-title s2member-pro-paypal-sp-checkout-form-coupon-section-title">
			<?php echo _x ("Coupon Code", "s2member-front", "s2member"); ?>
		</div>
		<div id="s2member-pro-paypal-sp-checkout-form-coupon-response-div" class="s2member-pro-paypal-form-div s2member-pro-paypal-sp-checkout-form-div s2member-pro-paypal-form-coupon-response-div s2member-pro-paypal-sp-checkout-form-coupon-response-div">
			%%coupon_response%% <!-- A Coupon response ( w/Discounts ) will be displayed here; based on the Coupon Code that was entered. -->
		</div>
		<div id="s2member-pro-paypal-sp-checkout-form-coupon-div" class="s2member-pro-paypal-form-div s2member-pro-paypal-sp-checkout-form-div s2member-pro-paypal-form-coupon-div s2member-pro-paypal-sp-checkout-form-coupon-div">
			<label for="s2member-pro-paypal-sp-checkout-coupon" id="s2member-pro-paypal-sp-checkout-form-coupon-label" class="s2member-pro-paypal-form-coupon-label s2member-pro-paypal-sp-checkout-form-coupon-label">
				<span><?php echo _x ("Have a Coupon Code? ( please enter it here )", "s2member-front", "s2member"); ?></span><br />
				<input type="text" maxlength="100" autocomplete="off" name="s2member_pro_paypal_sp_checkout[coupon]" id="s2member-pro-paypal-sp-checkout-coupon" class="s2member-pro-paypal-coupon s2member-pro-paypal-sp-checkout-coupon" value="%%coupon_value%%" tabindex="1" />
			</label>
			<input type="button" id="s2member-pro-paypal-sp-checkout-coupon-apply" class="s2member-pro-paypal-coupon-apply s2member-pro-paypal-sp-checkout-coupon-apply" value="<?php echo esc_attr (_x ("Apply Coupon", "s2member-front", "s2member")); ?>" tabindex="-1" />
		</div>
		<div style="clear:both;"></div>
	</div>
	
	<!-- Contact Info/Details ( Name, Email ). -->
	<!-- Some of this information will be prefilled automatically when/if a User/Member is already logged-in. -->
	<!-- Name fields will NOT be hidden automatically here; even if your Registration/Profile Field options dictate this behavior. -->
	<div id="s2member-pro-paypal-sp-checkout-form-registration-section" class="s2member-pro-paypal-form-section s2member-pro-paypal-sp-checkout-form-section s2member-pro-paypal-form-registration-section s2member-pro-paypal-sp-checkout-form-registration-section">
		<div id="s2member-pro-paypal-sp-checkout-form-registration-section-title" class="s2member-pro-paypal-form-section-title s2member-pro-paypal-sp-checkout-form-section-title s2member-pro-paypal-form-registration-section-title s2member-pro-paypal-sp-checkout-form-registration-section-title">
			<?php echo _x ("Contact Info", "s2member-front", "s2member"); ?>
		</div>
		<div id="s2member-pro-paypal-sp-checkout-form-first-name-div" class="s2member-pro-paypal-form-div s2member-pro-paypal-sp-checkout-form-div s2member-pro-paypal-form-first-name-div s2member-pro-paypal-sp-checkout-form-first-name-div">
			<label for="s2member-pro-paypal-sp-checkout-first-name" id="s2member-pro-paypal-sp-checkout-form-first-name-label" class="s2member-pro-paypal-form-first-name-label s2member-pro-paypal-sp-checkout-form-first-name-label">
				<span><?php echo _x ("First Name", "s2member-front", "s2member"); ?> *</span><br />
				<input type="text" aria-required="true" maxlength="100" autocomplete="off" name="s2member_pro_paypal_sp_checkout[first_name]" id="s2member-pro-paypal-sp-checkout-first-name" class="s2member-pro-paypal-first-name s2member-pro-paypal-sp-checkout-first-name" value="%%first_name_value%%" tabindex="10" />
			</label>
		</div>
		<div id="s2member-pro-paypal-sp-checkout-form-last-name-div" class="s2member-pro-paypal-form-div s2member-pro-paypal-sp-checkout-form-div s2member-pro-paypal-form-last-name-div s2member-pro-paypal-sp-checkout-form-last-name-div">
			<label for="s2member-pro-paypal-sp-checkout-last-name" id="s2member-pro-paypal-sp-checkout-form-last-name-label" class="s2member-pro-paypal-form-last-name-label s2member-pro-paypal-sp-checkout-form-last-name-label">
				<span><?php echo _x ("Last Name", "s2member-front", "s2member"); ?> *</span><br />
				<input type="text" aria-required="true" maxlength="100" autocomplete="off" name="s2member_pro_paypal_sp_checkout[last_name]" id="s2member-pro-paypal-sp-checkout-last-name" class="s2member-pro-paypal-last-name s2member-pro-paypal-sp-checkout-last-name" value="%%last_name_value%%" tabindex="20" />
			</label>
		</div>
		<div id="s2member-pro-paypal-sp-checkout-form-email-div" class="s2member-pro-paypal-form-div s2member-pro-paypal-sp-checkout-form-div s2member-pro-paypal-form-email-div s2member-pro-paypal-sp-checkout-form-email-div">
			<label for="s2member-pro-paypal-sp-checkout-email" id="s2member-pro-paypal-sp-checkout-form-email-label" class="s2member-pro-paypal-form-email-label s2member-pro-paypal-sp-checkout-form-email-label">
				<span><?php echo _x ("Email Address", "s2member-front", "s2member"); ?> *</span><br />
				<input type="text" aria-required="true" data-expected="email" maxlength="100" autocomplete="off" name="s2member_pro_paypal_sp_checkout[email]" id="s2member-pro-paypal-sp-checkout-email" class="s2member-pro-paypal-email s2member-pro-paypal-sp-checkout-email" value="%%email_value%%" tabindex="30" />
			</label>
		</div>
		<div style="clear:both;"></div>
	</div>
	
	<!-- Billing Method ( Customers can use a Credit/Debit card, or PayPal® w/Express Checkout ). -->
	<div id="s2member-pro-paypal-sp-checkout-form-billing-method-section" class="s2member-pro-paypal-form-section s2member-pro-paypal-sp-checkout-form-section s2member-pro-paypal-form-billing-method-section s2member-pro-paypal-sp-checkout-form-billing-method-section">
		<div id="s2member-pro-paypal-sp-checkout-form-billing-method-section-title" class="s2member-pro-paypal-form-section-title s2member-pro-paypal-sp-checkout-form-section-title s2member-pro-paypal-form-billing-method-section-title s2member-pro-paypal-sp-checkout-form-billing-method-section-title">
			<?php echo _x ("Billing Method", "s2member-front", "s2member"); ?>
		</div>
		<div id="s2member-pro-paypal-sp-checkout-form-card-type-div" class="s2member-pro-paypal-form-div s2member-pro-paypal-sp-checkout-form-div s2member-pro-paypal-form-card-type-div s2member-pro-paypal-sp-checkout-form-card-type-div">
			%%card_type_options%%
		</div>
		<div id="s2member-pro-paypal-sp-checkout-form-card-number-div" class="s2member-pro-paypal-form-div s2member-pro-paypal-sp-checkout-form-div s2member-pro-paypal-form-card-number-div s2member-pro-paypal-sp-checkout-form-card-number-div">
			<label for="s2member-pro-paypal-sp-checkout-card-number" id="s2member-pro-paypal-sp-checkout-form-card-number-label" class="s2member-pro-paypal-form-card-number-label s2member-pro-paypal-sp-checkout-form-card-number-label">
				<span><?php echo _x ("Card Number ( no dashes or spaces )", "s2member-front", "s2member"); ?> *</span><br />
				<input type="text" aria-required="true" maxlength="100" autocomplete="off" name="s2member_pro_paypal_sp_checkout[card_number]" id="s2member-pro-paypal-sp-checkout-card-number" class="s2member-pro-paypal-card-number s2member-pro-paypal-sp-checkout-card-number" value="%%card_number_value%%" tabindex="110" />
			</label>
		</div>
		<div id="s2member-pro-paypal-sp-checkout-form-card-expiration-div" class="s2member-pro-paypal-form-div s2member-pro-paypal-sp-checkout-form-div s2member-pro-paypal-form-card-expiration-div s2member-pro-paypal-sp-checkout-form-card-expiration-div">
			<label for="s2member-pro-paypal-sp-checkout-card-expiration" id="s2member-pro-paypal-sp-checkout-form-card-expiration-label" class="s2member-pro-paypal-form-card-expiration-label s2member-pro-paypal-sp-checkout-form-card-expiration-label">
				<span><?php echo _x ("Card Expiration Date ( mm/yyyy )", "s2member-front", "s2member"); ?> *</span><br />
				<input type="text" aria-required="true" maxlength="100" autocomplete="off" name="s2member_pro_paypal_sp_checkout[card_expiration]" id="s2member-pro-paypal-sp-checkout-card-expiration" class="s2member-pro-paypal-card-expiration s2member-pro-paypal-sp-checkout-card-expiration" value="%%card_expiration_value%%" tabindex="120" />
			</label>
		</div>
		<div id="s2member-pro-paypal-sp-checkout-form-card-verification-div" class="s2member-pro-paypal-form-div s2member-pro-paypal-sp-checkout-form-div s2member-pro-paypal-form-card-verification-div s2member-pro-paypal-sp-checkout-form-card-verification-div">
			<label for="s2member-pro-paypal-sp-checkout-card-verification" id="s2member-pro-paypal-sp-checkout-form-card-verification-label" class="s2member-pro-paypal-form-card-verification-label s2member-pro-paypal-sp-checkout-form-card-verification-label">
				<span><?php echo _x ("Card Verification Code ( 3-4 digits )", "s2member-front", "s2member"); ?> * <a href="http://en.wikipedia.org/wiki/Card_security_code" target="_blank" tabindex="-1" rel="external nofollow"><?php echo _x ("need help?", "s2member-front", "s2member"); ?></a></span><br />
				<input type="text" aria-required="true" maxlength="100" autocomplete="off" name="s2member_pro_paypal_sp_checkout[card_verification]" id="s2member-pro-paypal-sp-checkout-card-verification" class="s2member-pro-paypal-card-verification s2member-pro-paypal-sp-checkout-card-verification" value="%%card_verification_value%%" tabindex="130" />
			</label>
		</div>
		<!-- This is displayed only when Maestro®/Solo® cards are selected as the Payment Method. -->
		<div id="s2member-pro-paypal-sp-checkout-form-card-start-date-issue-number-div" class="s2member-pro-paypal-form-div s2member-pro-paypal-sp-checkout-form-div s2member-pro-paypal-form-card-start-date-issue-number-div s2member-pro-paypal-sp-checkout-form-card-start-date-issue-number-div">
			<label for="s2member-pro-paypal-sp-checkout-card-start-date-issue-number" id="s2member-pro-paypal-sp-checkout-form-card-start-date-issue-number-label" class="s2member-pro-paypal-form-card-start-date-issue-number-label s2member-pro-paypal-sp-checkout-form-card-start-date-issue-number-label">
				<span><?php echo _x ("Card Start Date ( mm/yyyy ), or Issue Number", "s2member-front", "s2member"); ?> *</span><br />
				<input type="text" aria-required="true" maxlength="100" autocomplete="off" name="s2member_pro_paypal_sp_checkout[card_start_date_issue_number]" id="s2member-pro-paypal-sp-checkout-card-start-date-issue-number" class="s2member-pro-paypal-card-start-date-issue-number s2member-pro-paypal-sp-checkout-card-start-date-issue-number" value="%%card_start_date_issue_number_value%%" tabindex="140" />
			</label>
		</div>
		<div style="clear:both;"></div>
	</div>
	
	<!-- Billing Address ( hidden dynamically when/if PayPal® is selected as the Payment Method ). -->
	<div id="s2member-pro-paypal-sp-checkout-form-billing-address-section" class="s2member-pro-paypal-form-section s2member-pro-paypal-sp-checkout-form-section s2member-pro-paypal-form-billing-address-section s2member-pro-paypal-sp-checkout-form-billing-address-section">
		<div id="s2member-pro-paypal-sp-checkout-form-billing-address-section-title" class="s2member-pro-paypal-form-section-title s2member-pro-paypal-sp-checkout-form-section-title s2member-pro-paypal-form-billing-address-section-title s2member-pro-paypal-sp-checkout-form-billing-address-section-title">
			<?php echo _x ("Billing Address", "s2member-front", "s2member"); ?>
		</div>
		<div id="s2member-pro-paypal-sp-checkout-form-street-div" class="s2member-pro-paypal-form-div s2member-pro-paypal-sp-checkout-form-div s2member-pro-paypal-form-street-div s2member-pro-paypal-sp-checkout-form-street-div">
			<label for="s2member-pro-paypal-sp-checkout-street" id="s2member-pro-paypal-sp-checkout-form-street-label" class="s2member-pro-paypal-form-street-label s2member-pro-paypal-sp-checkout-form-street-label">
				<span><?php echo _x ("Street Address", "s2member-front", "s2member"); ?> *</span><br />
				<input type="text" aria-required="true" maxlength="100" autocomplete="off" name="s2member_pro_paypal_sp_checkout[street]" id="s2member-pro-paypal-sp-checkout-street" class="s2member-pro-paypal-street s2member-pro-paypal-sp-checkout-street" value="%%street_value%%" tabindex="200" />
			</label>
		</div>
		<div id="s2member-pro-paypal-sp-checkout-form-city-div" class="s2member-pro-paypal-form-div s2member-pro-paypal-sp-checkout-form-div s2member-pro-paypal-form-city-div s2member-pro-paypal-sp-checkout-form-city-div">
			<label for="s2member-pro-paypal-sp-checkout-city" id="s2member-pro-paypal-sp-checkout-form-city-label" class="s2member-pro-paypal-form-city-label s2member-pro-paypal-sp-checkout-form-city-label">
				<span><?php echo _x ("City / Town", "s2member-front", "s2member"); ?> *</span><br />
				<input type="text" aria-required="true" maxlength="100" autocomplete="off" name="s2member_pro_paypal_sp_checkout[city]" id="s2member-pro-paypal-sp-checkout-city" class="s2member-pro-paypal-city s2member-pro-paypal-sp-checkout-city" value="%%city_value%%" tabindex="210" />
			</label>
		</div>
		<div id="s2member-pro-paypal-sp-checkout-form-state-div" class="s2member-pro-paypal-form-div s2member-pro-paypal-sp-checkout-form-div s2member-pro-paypal-form-state-div s2member-pro-paypal-sp-checkout-form-state-div">
			<label for="s2member-pro-paypal-sp-checkout-state" id="s2member-pro-paypal-sp-checkout-form-state-label" class="s2member-pro-paypal-form-state-label s2member-pro-paypal-sp-checkout-form-state-label">
				<span><?php echo _x ("State / Province", "s2member-front", "s2member"); ?> *</span><br />
				<input type="text" aria-required="true" maxlength="100" autocomplete="off" name="s2member_pro_paypal_sp_checkout[state]" id="s2member-pro-paypal-sp-checkout-state" class="s2member-pro-paypal-state s2member-pro-paypal-sp-checkout-state" value="%%state_value%%" tabindex="220" />
			</label>
		</div>
		<div id="s2member-pro-paypal-sp-checkout-form-country-div" class="s2member-pro-paypal-form-div s2member-pro-paypal-sp-checkout-form-div s2member-pro-paypal-form-country-div s2member-pro-paypal-sp-checkout-form-country-div">
			<label for="s2member-pro-paypal-sp-checkout-country" id="s2member-pro-paypal-sp-checkout-form-country-label" class="s2member-pro-paypal-form-country-label s2member-pro-paypal-sp-checkout-form-country-label">
				<span><?php echo _x ("Country", "s2member-front", "s2member"); ?> *</span><br />
				<select aria-required="true" name="s2member_pro_paypal_sp_checkout[country]" id="s2member-pro-paypal-sp-checkout-country" class="s2member-pro-paypal-country s2member-pro-paypal-sp-checkout-country" tabindex="230">
					%%country_options%%
				</select>
			</label>
		</div>
		<div id="s2member-pro-paypal-sp-checkout-form-zip-div" class="s2member-pro-paypal-form-div s2member-pro-paypal-sp-checkout-form-div s2member-pro-paypal-form-zip-div s2member-pro-paypal-sp-checkout-form-zip-div">
			<label for="s2member-pro-paypal-sp-checkout-zip" id="s2member-pro-paypal-sp-checkout-form-zip-label" class="s2member-pro-paypal-form-zip-label s2member-pro-paypal-sp-checkout-form-zip-label">
				<span><?php echo _x ("Postal / Zip Code", "s2member-front", "s2member"); ?> *</span><br />
				<input type="text" aria-required="true" maxlength="100" autocomplete="off" name="s2member_pro_paypal_sp_checkout[zip]" id="s2member-pro-paypal-sp-checkout-zip" class="s2member-pro-paypal-zip s2member-pro-paypal-sp-checkout-zip" value="%%zip_value%%" tabindex="240" />
			</label>
		</div>
		<div id="s2member-pro-paypal-sp-checkout-form-ajax-tax-div" class="s2member-pro-paypal-form-div s2member-pro-paypal-sp-checkout-form-div s2member-pro-paypal-form-ajax-tax-div s2member-pro-paypal-sp-checkout-form-ajax-tax-div">
			<!-- Sales Tax will be displayed here via Ajax; based on state, country, and/or zip code range. -->
		</div>
		<div style="clear:both;"></div>
	</div>
	
	<!-- Captcha ( A reCaptcha section, with a required security code will appear here; if captcha="1" ). -->
	%%captcha%%
	
	<!-- Checkout Now ( this holds the submit button, and also some dynamic hidden input variables ). -->
	<div id="s2member-pro-paypal-sp-checkout-form-submission-section" class="s2member-pro-paypal-form-section s2member-pro-paypal-sp-checkout-form-section s2member-pro-paypal-form-submission-section s2member-pro-paypal-sp-checkout-form-submission-section">
		<div id="s2member-pro-paypal-sp-checkout-form-submission-section-title" class="s2member-pro-paypal-form-section-title s2member-pro-paypal-sp-checkout-form-section-title s2member-pro-paypal-form-submission-section-title s2member-pro-paypal-sp-checkout-form-submission-section-title">
			<?php echo _x ("Checkout Now", "s2member-front", "s2member"); ?>
		</div>
		%%opt_in%% <!-- s2Member will fill this when/if there are list servers integrated, and the Opt-In Box is turned on. -->
		<div id="s2member-pro-paypal-sp-checkout-form-submit-div" class="s2member-pro-paypal-form-div s2member-pro-paypal-sp-checkout-form-div s2member-pro-paypal-form-submit-div s2member-pro-paypal-sp-checkout-form-submit-div">
			%%hidden_inputs%% <!-- Auto-filled by the s2Member software. Do NOT remove this under any circumstance. -->
			<input type="submit" id="s2member-pro-paypal-sp-checkout-submit" class="s2member-pro-paypal-submit s2member-pro-paypal-sp-checkout-submit" value="<?php echo esc_attr (_x ("Submit Form", "s2member-front", "s2member")); ?>" tabindex="500" />
		</div>
		<div id="acceptagb" class="agb">
		<input type="Checkbox" name="agb" value="inhalt"> Ich akzeptiere die AGBs.
		</div>
		<div style="clear:both;"></div>
</div>
	
	
	
</form>

<script type="text/javascript">
(function($)
    {
        $('form#s2member-pro-paypal-sp-checkout-form').submit (function()
            {
                if (document.mailer.agb.checked==false)
                    {
                        alert('Please check the box that you agree!');
                        return false;
                    }
                else
                    return true;
            });
    })(jQuery);
</script>
  • This reply was modified 4 years, 8 months ago by  keyhanjun.
Posted: Sunday May 6th, 2012 at 10:44 pm #12776

That’s great! Thank you for the update. :)

Viewing 14 replies - 1 through 14 (of 14 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.