Membership plugin - custom field for sign up form

2 posts by 2 authors in: Forums > CMS Builder
Last Post: January 26, 2016   (RSS)

By superhappybunnycat - January 26, 2016

Hi,
I've installed this plugin to my site. I plan to set it up so there are different subscriptions available that you can pay monthly for that will give you access to certain content on the site. As such I am trying to add a membership type field to the sign up form. I am using the below code but it's not working

I am successfully pulling the membership list from the CMS for the dropdown. The form submits fine and sets up the user, but it doesn't save the membership type against the user

<select name="membership_status" id="select">
<?php foreach ($membership_plansRecords as $record): ?>
<option value="<?php echo htmlencode(@$_REQUEST['membership_status']); ?>"><?php echo htmlencode($record['title']) ?></option>
<?php endforeach ?></select>

By Damon - January 26, 2016

Hi,

Make sure you also have code like this to add the values to be inserted into the database:

$colsToValues['membership_status']            = $_REQUEST['membership_status'];

This needs to be added around line 65 of the user signup page. 

Also, make sure you have a field in CMS Builder to receive the data (membership_status).

Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/