Form Elements
All forms have certain settings that describe how this form acts and reacts to events. Although there are a couple settings that are optional, this area will become quite familiar:
Form Name
The FormName is probably the most important setting of the form. This name defines how the system will look for this form. Once a form is saved the first time (or imported), this FormName cannot be changed. It is replicated as the Identifier for this form in the RegisterLink, RegisterButton and LoginButton controls.
Description
The Description for a form is presently available as an administrative aid to add lengthy descriptive elements to a form. This setting is never shown to the user.
Type of Form
There are several types of forms, each with its unique requirements and workflow. They are described in detail in point 6. Managing Workflow Processes. There are two options that become available for certain FormTypes.
Portal Registration Form
A Portal Form adds a portal, creates a registered user in the portal in which you complete the form. Selecting this form type brings up other controls to help you design your form.
- The Administrator of the New Portal :
This setting has three options
- Is the Applicant
This setting creates a new portal with the current user as the new administrator
- Is a Role in this Portal
This setting creates a new portal with the selected role of the current portal as the selected role of the new portal. When you select this setting two new drop down lists will appear to allow you to select the roles.
- Is a Role in a Different Portal
This setting creates a new portal with the selected role of the specified portal as the selected role of the new portal. When you select this setting new controls will appear to allow you to select the portal where the Admin role will be copied from and the roles to be copied and created.
User Registration Form
A User Form creates a user and adds to the Registered Users role. There are no extra controls for this form type.
Role Registration Form
A Role Registration Form allows you to do a few things. First you’ll be asked to register to the website if you are not already registered. If you are already a user, but not logged in, and your username and password match an existing user, it will log you in. Third, you will be added to the security role in the portal that the form is being used to register for. Selecting this setting will bring up a drop down list that contains the names of the roles in the current DNN portal. You can select a role and the form will add the registering user to that role.
Custom Form
A Custom Form can do nearly anything that you can program it to do. When you select this setting other settings will appear to allow you to control your forms creation in more detail
- Custom Ctl
The Ctl represents the path to the ASP.NET Custom User Control you create to handle the custom events after posting the form and saving its values. Here you have two settings;
The module control already exists : This setting requires that you have installed an ‘ascx’ file within the DNN architecture and given it a control key with which to call it. To install this ascx within the architecture, see Installing custom ascx ( Topic etc.)
I will make the module control later : This setting only requires you to name the custom control, as it will be installed later, or possibly is already installed on the server that will host your form.
- Custom Control Name
This control is where you will enter the name of the custom control that will handle the processing of completed forms. Depending upon the setting of Custom Ctl this control will be either a textbox or a drop down list.
- ForceUserRegistration
This setting allows you to force the User to be registered for the portal, overriding the Admin Setting that disables public registration. If you have selected to use Email Verification for new user registration, that will still be enforced.
Synchronize User Data
This setting allows you to call upon DNN’s stored user data to populate specific field for the current user. While your form is being filled out any fields that are set with Associations (see Topic blah) will be filled in with the data from the Registered Users table.
Accessibility
This setting will control the ability of some users to view or access the form. There are two settings, one is Unrestricted the other being Restricted. The Unrestricted setting will allow any user, Anonymous, registered, Admin or otherwise to access, fill out and view the completed form. The restricted setting will only allow Users with viewing rights to the page to view and complete the form.
HasAgreement
If your form requires the agreement to a set of terms, conditions, policies, restrictions, or disclaimers, you can use the built in Agreement control to display this. If you have HasAgreement set to True, the user cannot continue to the form without first agreeing to the terms and conditions page.
Agreement
If you have set the HasAgreement element to True, then the Agreement field becomes the storage area for the rich html content that you would present to the user as an agreement page. This content can include most standard, non intrusive html tags, as well as embedded images, file links and many other qualities of rich text content. This page includes a button to print the agreement in a new browser window, and will show up after the optional instructions page but before the form.
HasInstructions
If your form has a complex process for registration, or if you wish to show a printable page to the applicant before they register, then you can opt to include the Instructions page with your form in the workflow by setting HasInstructions to True.
Instructions
If you have set the HasInstructions element to True, then the Instructions field becomes the storage area for the rich html content that you would present to the user as the instructions page. This content can include most standard, non intrusive html tags, as well as embedded images, file links and many other qualities of rich text content. This page includes a button to print the agreement in a new browser window, and will show up before the optional agreement page and also before the form.