Article Contents Related Articles Tags
  • No tags found.
Was This Helpful? Last Updated
  • 2012/07/09

Custom Registration Form

What is a Custom Form?

A custom form is a registration form that you design entirely from scratch. That means that the program's templating system will not be used to render the form or the fields on the form.

Comparison of Form Types

The greatest benefit that a custom form has is that it gives you complete control over the layout of the form. However, the downside of this is that you will need to code everything manually. The only thing the program does is process the submitted form and do basic validation checks (like duplicate usernames, e-mail format, and required fields). For this reason, we only recommend that advanced users with strong HTML, CSS, jQuery, and PHP skills use this method.

FeatureTemplate-Generated FormStand Alone Custom Form
Automated Inline ErrorsYesNo[1]
Automated password and username checksYesNo[2]
Multi-page FormsYesYes
Coding RequiredNoYes
Full Control Over Individual Field LayoutNo[3]Yes

Index The Form

Regardless of whether you choose to use the templating-system or create a custom form, you will need to index your form. Doing this will provide you with a form ID which will be required when designing your form. This also allows you to establish page locations for multi-page forms, and required fields for each page on the form.

Coding the Form

Required Fields

All field names are case sensitive!
Field NamePurpose
idThe Form ID attained from "Settings » Registration Forms"
actionMust always be "process".
pageThe numerical value of the current page being processed. For single-page forms, set this to "1".

Recommended Fields

These fields are not required, but are recommended.

Field NamePurposeAction if missing
usernameUsername field.If you choose not to include a username field on your form, the "email" field will be used. If that is missing, a random username will be assigned to the account. Note that if you have the E-Mail as Login option set to "Yes", you will not need a "username" field on the form, instead just make sure that you have an "email" field.
passwordPassword field.A random password will be generated.
repeat_pwdRepeat password field.Additional InformationAlways required if the "password" field is on the form.N/A
emailE-Mail address.N/A
first_nameFirst nameN/A
last_nameLast nameN/A

Sample Form

<form action="/members/register.php" method="post" />

<input type="hidden" name="id" value="FORM_ID_HERE" />
<input type="hidden" name="action" value="process" />
<input type="hidden" name="page" value="1" />

<fieldset>
<legend>Account Information</legend>
<p>Please select your desired account information.</p>

<label>Username</label>
<input type="text" name="username" value="" />

<label>Password</label>
<input type="password" name="password" value="" />

<label>Repeat Password</label>
<input type="password" name="repeat_pwd" value="" />
</fieldset>

<fieldset>
<legend>Contact Information</legend>
<p>Please input your contact information.</p>

<label>E-Mail</label>
<input type="text" name="email" value="" />

<label>First Name</label>
<input type="text" name="first_name" value="" />

<label>Last Name</label>
<input type="text" name="last_name" value="" />
</fieldset>

<input type="submit" value="Register" />

</form>

Some Important Notes

  • Any field on the form that is not currently in the database will be automatically added into the database as either a "text" or "textarea" field. If you need the field to be something more specific, such as a "select" or "checkbox" field, you will need to create the custom field first.
  1. By default, a generic error screen with the error messages will appear, although you could use jQuery to validate the form.
  2. Although you could use a combination of PHP and jQuery to validate this information.
  3. Each field is generated by the "Registration: Field" template, which is a sub-template of the "Registration Page" template.