Membership login to admin backend

By (Deleted User) - December 13, 2010

Hi Chris / Jason,

Quick question: On the form fields in the signup page you have the value below. How do I insert or create a default value in the event that the user doesn't fill in the textfield? i.e. I don't want the field to be mandatory but I do want something to be filled in automatically if the user leaves it blank. e.g. if the user leave the website field blank then it must use a default value of "no website" automatically.

value="<?php echo htmlspecialchars(@$_REQUEST['web_address']); ?>"

regards
Shawn

Re: [smesa] Membership login to admin backend

By Jason - December 13, 2010

Hi Shawn,

You can do a check just before you insert the record in the database like this:

if(!@$_REQUEST['web_address']){
//set a default value if value not entered by the user.
$_REQUEST['web_address']="no website";
}


Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

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

Re: [smesa] Membership login to admin backend

Hi Shawn,

Just noticed your post regarding protecting from spambots.

One of the things that I did in addition to the "disabled" field was to add an "approved" field to my section, and then implement the emailOnApproved plugin to automatically send an e-mail to the applicant on approval of their account.

I also wanted to use CAPTCHA validation on my membership signup form and although RE-CAPTCHA was pretty easy to implement, it was a pretty intrusive addition to many web pages.

I discovered another alternative in a program called Captcha Creator. http://www.captchacreator.com/

I can format the Captcha display to fit my page design and it works like a charm. Their program is not free, and an unlimited use license costs $50.

It's a pretty simple setup, but there were some challenges with CMSB integration that needed to be worked out. (See Post http://www.interactivetools.com/forum/gforum.cgi?post=83615

You can find detailed recipes for implementation of both the membership plugin and CAPTCHA in my CMSB Cookbook. http://www.thecmsbcookbook.com

Best,

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php