Dynamic Membership Fee Calculation

Is there a way of carrying over a total from a form, so that the total value in that form becomes the membership price paid in this plugin?

I asked this within another thread, but think I should really start this new thread to keep things on topic.

    Patrick

    Hiya @PROPAGANDA,

    Sorry for taking so long, been busy...

    Thanks for a fun puzzle! Got it working too

    You can play with it on one of my test sites here:
    http://etcemall.com/formidable-test/
    Note that I only created 4 combinations to test this out (any other combination will do nothing):
    Single option = Posts
    Two options = Posts + Events
    Three options = Posts + Events + Groups
    All options = Posts + Events + Groups + Blogs

    Try all 4 combinations to see the self-updating blue box

    Here's how to git 'er done!

    Create an access level for each option you want to offer your users. In my test, I created the following 4 options (with corresponding access levels):
    - Post to the main site
    - Create & manage events
    - Create & manage BP groups
    - Create blogs

    Depending on the number of paid options you want to offer your users, you will need to create a distinct subscription plan (with appropriate access levels) for each and every possible combination. Sorry, the Membership plugin cannot dynamically create a subscription. That means that if you offer 4 paid options like in my example above (A, B, C and D), you will need a total of 15 plans as follows
    A, B, C, D, A+B, A+C, A+D, B+C, B+D, C+D, A+B+C, A+B+D, A+C+D, B+C+D, A+B+C+D
    Plus the free subscription level if you also offer that.

    Use the same page you set in Membership settings for registration. You need to add both the FP form shortcode and the Membership shortcode to that page. The presence of the Membership shortcode is detected and, when present, all page content is displayed (if it's not there, only the standard subscription form is displayed).

    The Membership form will be hidden via CSS (unless you want to figure out how to unhook it; I didn't dig into that though).

    Got your access levels and subscription plans all done? Time to build your form then. Happily, FormidablePro has their nifty template import feature. Make sure your import path is set in Formidable Settings, then unzip the attached .zip folder, and FTP the file inside to the correct location. After clicking the update link, you should see the template under... templates

    Customize that template to match your requirements. There are a few important things that must be done for this to work:

    1. You must use an individual field with radio buttons for each option. It won't work with checkboxes for each option in the same field.
    2. Use negative conditional rules in the custom HTML fields to display the appropriate plan details. If you use a positive rule (is equal to), it will be true when the user first visits the page as none of the radio buttons will be selected yet. You might get 2 or more plans displaying at the same time (confusing for the user, no?)

    I added their preset CSS classes, but you can change the layout anyway you want.

    Note the all-important addition of a link in each HTML section like this:
    <a href="http://example.com/register/?action=registeruser&subscription=1">Continue</a>
    To get those links, you can either display the Membership form with all your subscriptions, and click through to each, or simply hover your mouse pointer over each subscription name (Membership > Subscription Plans) and note the sub_id you see in the bottom-left of your browser window.. The only thing that will change will be the subscription ID at the end.

    As you'll be adding a custom button for each subscription plan, the form's "Submit" button becomes redundant. Also, the form isn't used to submit any content, only to display different links for different plans. So we hide the button as well as the Membership subscription form.

    Below is the CSS you need to hide the form's Submit button, and the Membership subscription form (remember to change the page ID to the actual ID of your page):

    .with_frm_style p.submit, #page-id-1277 #membership-wrapper {
    	display: none;
    }

    I think that's pretty much it. Have fun!