I have Membership and BuddyPress installed. I need to place

I have Membership and BuddyPress installed.

I need to place a subscription form in the front page and use it as the main signup form. I would also like to know how I can add a custom field to the form so the user specifies his website url and select radio button to select whether free subscription or one of the paying ones.

I looked at the code of a form generated when clicking at one of the subscription buttons and copied it but it didn't work. When I fill it out and submit, nothing happens, same page comes back and not member entry is created.

Can you help?

- Joe

Here's the code I used:

<form action="" name="signup_form" id="signup_form" class="standard-form" method="post" enctype="multipart/form-data">
<input type="hidden" value="10" name="subscription">
<h2>Sign Up to Join Free</h2>
<p>Registering for this site is easy, just fill in the fields below to get a new account set up for you in no time.</p>
<div id="basic-details-section" class="register-section">
<h4>Account Details</h4>
<label for="signup_username">Username (required)</label>
<input id="signup_username" value="" name="signup_username" type="text" />
<label for="signup_email">Email Address (required)</label>
<input type="text" value="" id="signup_email" name="signup_email"></br>
<label for="signup_password">Choose a Password (required)</label>
<input type="password" value="" id="signup_password" name="signup_password"></br>
<label for="signup_password_confirm">Confirm Password (required)</label>
<input type="password" value="" id="signup_password_confirm" name="signup_password_confirm"></br>
</div><!-- #basic-details-section -->
<div id="profile-details-section" class="register-section">
<h4>Profile Details</h4>
<div class="editfield">
<label for="field_1">Name (required)</label>
<input type="text" value="" id="field_1" name="field_1">
<p class="description"></p>
<input type="hidden" value="1" id="signup_profile_field_ids" name="signup_profile_field_ids">
</div><!-- #profile-details-section -->
<div class="submit">
<input type="submit" name="signup_submit" id="signup_submit" value="Sign Up">
<input type="hidden" value="72db0bd0d7" name="_wpnonce" id="_wpnonce">
<input type="hidden" value="/sign-up/?action=registeruser&subscription=10" name="_wp_http_referer">
<input type="hidden" value="validatepage1bp" name="action">

  • Alexander
    • DEV MAN’s Mascot

    Hi @Joe,

    Copying the HTML code wouldn't work because it's not submitting to the right page. By default, the forms action will go to the same page it is created on. With the way you have this setup, there's nothing setup to process the form where it's being submitted.

    I'd recommend just using some of the shortcodes available for subscription buttons:

    [subscriptiontitle subscription="2"] – The title of the subscription.
    [subscriptiondetails subscription="2"] – The Subscription plan details.
    [subscriptionprice subscription="2"] – The subscription plan price.
    [subscriptionbutton subscription="2"] - And the subscription plan button

    Best regards,

  • Joe
    • Site Builder, Child of Zeus

    Hello Alex,

    Thank you for your feedback. I am already implementing the shortcodes in another way.

    But that is not my intention. As I mentioned, my purpose is to place a form in the frontpage, no buttons, just directly the form that registers the user.


  • Alexander
    • DEV MAN’s Mascot

    Hi Joe,

    If you want to custom code the form, you'll need to start by working with the PHP from "membershipincludes/includes/bp.registration.form.php"

    Copying the HTML won't work because there are many things processed server side, including things specific to the user's session.

    Using that code will ensure that any actions are properly processed.

    Best regards,

    EDIT: I see you posted this here as well: https://premium.wpmudev.org/forums/topic/membershipbuddypress-new-account-form I'm going to close that one, and we can followup here as needed.

  • Joe
    • Site Builder, Child of Zeus

    Hello Alexander

    OK. I'm using that code you mentioned. However. not sure why it doesn't submit.

    I did a couple of modification as follows:


    <input type='hidden' name='subscription' value='<?php echo esc_attr($_REQUEST['subscription']); ?>' />

    <input type='hidden' name='subscription' value='10' />

    and added:

    <input type="hidden" value="/sign-up/?action=registeruser" name="_wp_http_referer">

    right before the </form>

    But it doesn't submit.

    Any idea?



    Never mind the above, I was missing something and now it works.

    I added my signup to the form as follows
    <form action="/sign-up/" name="signup_form" id="signup_form" class="standard-form" method="post" enctype="multipart/form-data">


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.