Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder: Plugins & Add-ons:
Membership Signup page

 

 


pbsahost
Novice

Jan 3, 2012, 9:01 PM

Post #1 of 3 (593 views)
Shortcut
Membership Signup page Can't Post

I have been working on a membership plugin signup form. I setup a membership types section and I created a drop down list of the types on the form. After a few tests of the errors the membership types disappear from the drop down. I am struggling finding the reason as it doesn't appear to break every time at the same place. The test site is available:

I attached the signup file.

Thanks for any insight.
Jeremy


(This post was edited by pbsahost on Jan 4, 2012, 11:24 AM)


Jason
Staff / Moderator


Jan 4, 2012, 10:59 AM

Post #2 of 3 (574 views)
Shortcut
Re: [pbsahost] Membership Signup page [In reply to] Can't Post

Hi Jeremy,

If you enter in a value for "title" and hit submit, you'll see the membership type have no values. The reason for this is that the name "title" is also a field in your membership type section. This is triggering off the automatic search feature of getRecords(). Since there will be no membership type records with a title matching what the user entered, no values appear.

You can stop this from happening by adding the "allowSearch" => false, option to getRecords like this:


Code
// load records 
list($membership_typesRecords, $membership_typesMetaData) = getRecords(array(
'tableName' => 'membership_types',
'where' => 'registration=1',
'allowSearch' => false,
));


That should take care of the problem for you.

Hope this helps
---------------------------------------------------
Jason Sauchuk - Programmer 
interactivetools.com

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


pbsahost
Novice

Jan 4, 2012, 11:23 AM

Post #3 of 3 (570 views)
Shortcut
Re: [Jason] Membership Signup page [In reply to] Can't Post

Thanks Jason,

That worked great. I knew it had to be something simple. Have a great day!

Jeremy