You are viewing version #7 of a page entitled Create Form Stand Alone. The page Owner is admin and the last changes were made by admin 5 months ago. There are 800 words in this revision and it has been viewed 601 times.
This page is Protected from any changes.
Creating a Custom Stand-Alone Form
What is a Stand Alone Form
A “Stand-Alone” form, unlike a “Template-Generated” form, is one that is NOT rendered by ppSD2. This means that you will have to manually create an HTML file with all of the form fields.
The “Stand-Alone” method is only recommended for advanced users with knowledge of HTML and web forms. Most users should use the much simpler “Template-Generated” system.
Benefits of a Stand-Alone Form
- Full control over the layout of the form and HTML page.
- Ability to add custom JavaScript, such as character counters and client-side form validation.
Drawbacks of a "Stand-Alone" Form
- Limited error reporting: errors will not appear on the same page as the form itself.
- More complicated and time-consuming than creating a “Template-Generated” form.
Step 1: Add the Form to the Database
From the ppSD2 admin control panel, create a form. Make sure that you set the “Template Generated” field to “Custom Stand-Alone Page”. By creating this form from within ppSD2 you are effectively informing the program that it is okay to allow registrations from this form (safety measure). A form will not work unless you create it from within the ppSD2 control panel first.
Step 2: Setting Page Locations and Required Fields
After you’ve created the form from within the ppSD2 control panel, do the following:
- Hover your mouse over “Setup” and click on “List Forms”
- Find the form within the list of forms and make a note of the form’s unique ID
- Page Locations: On the resulting screen, you will be able to input a location for each page of the stand-alone form. Input pages as full URLs. Example:
- Presuming your have a 3 page form, you would input:
- Required Fields: On the same page, find the section entitled “Required Fields”. Input the exact cAsE SeNsItIvE field names that you wish to make required, one-per-line, for each page of the registration form. Example:
- Presuming you have a 3 page form and you wanted to make the “first_name”, “last_name”, “email”, “username”, and “phone” fields required, you would input:
- Page 1: (this presumes that the “username” and “email” fields are on page 1 of the form)
username email
- Page 2: (this presumes that the “first_name” and “last_name” fields are on page 2 of the form)
first_name last_name
- Page 3: (this presumes that the “phone” fields is on page 3 of the form)
phone
- Note: Only place required fields within these text fields. Even if there are other fields on the page, you only need to input those field names if you want to make them required.
Step 3: Creating the HTML file for the Stand-Alone Form
<form action="http://www.yoursite.com/ppSD2/register.php" method="post"> <input type="hidden" name="action" value="process" /> <input type="hidden" name="id" value="form_id_here" /> <input type="text" name="eXaCt_FiElD_1_nAmE_HeRe" value="" /> <input type="text" name="eXaCt_FiElD_2_nAmE_HeRe" value="" /> etc. <input type="submit" value="Register" /> </form>
Password
<input type="password" name="password" value="" /> <input type="password" name="repeat_pwd" value="" />
Required Changes to the Above Code
- Replace “eXaCt_FiElD_1_nAmE_HeRe” and “eXaCt_FiElD_2_nAmE_HeRe” with the actual field names, such as “phone”, “address1”, etc.
- Replace “form_id_here” with the form’s unique ID. You can find this from the ppSD2 admin control panel by hovering your mouse over “Setup” and clicking on “List Forms”
Things to Remember
- We recommend that all registration forms have the “username”, “password”, “repeat_pwd”, and “email” fields on them.
- If you place the “password” field on a form, you MUST also place the “repeat_pwd” field on the same form.
- In the event that both the “username” and “email” fields are not included on the form, a random username will be issued for the account and the user will not be able to receive e-mails from the program.
- In the event that the “password” is not included on the form, a random password will be issued for the account.
- In the event that the “email” is not included on the form, the user will not be able to receive e-mails from the program.
- You are not required to use existing fields on the form (”Setup” > “List Custom Fields”). Any field name included on the form that does not currently exist in the database will be automatically created.
- “Stand-Alone” forms cannot use the built in error system that “Template-Generated” forms benefit from. Errors will be reported using the standard “Error Page” template.
This page last modifed by admin @ 16 April 2010 08:25. Created on 14 August 2009 06:38 



|