Understanding Forms
A form on a DNN Portal website can allow the user to enter information for the administrator of the portal, participate in a survey for the gathering of information, or to register for an event. These forms can be difficult for the inexperienced user to create and operate, but with the help of KHZ_FormGen. Portal Administrators can now quickly and easily create dynamic forms to allow for most any business process to be carried out during and after data collection.
Designing Forms
To create forms from this module, you will require a basic understanding of HTML, CSS and SQL. Prior knowledge of XML is not required, but comes in quite handy when troubleshooting the import process. It is recommended that you also sit down and plan the workflow for any processes you wish to carry out, so that the forms are properly structured when completed.
Form Composition
The creation of a form is essentially the combination of an HTML file that defines the design layer for the form and its layout and contents, an XML file that gives the structure to the fields on the form and defines how this form acts and reacts to the given events, a Cascading Style Sheet to direct the fonts, background colors and graphics of the Form, Images to display in the html file, and SQL Scripts to create the Tables and Stored Procedures for handling any data retrieval or post processing for the form.
HTML design layer
The entire process starts with a simple HTML formatted template. This template includes simple tags surrounded by square brackets [FIELDNAME] that represent each field in any custom form you make; very similar to the way DotNetNuke handles Skinning. When the form is created for the user, each of these special tags is replaced by several custom asp.net controls allowing the display, input entry, and validation of input. The name of the Html file must be in this format: “FormName”.htm, where the FormName is exactly the name of that form as declared in the FormName element: see Topic 4.3.1.
Cascading Style Sheet
The Cascading Style Sheet is an optional file which allows for complete CSS settings for the selected form, independent of any other CSS sheets you may have. This flexibility gives you the ability to make each form completely unique. The name of the CSS file must be in this format: “FormName”.css, where the FormName is exactly the name of that form as declared in the FormName element: see Topic 4.3.1.
Images
In most cases, your form will contain graphics and background images for borders and content. You can easily include these images in the Form Package by referencing them within the html file directly. All that is required to import these is to include them in the Form Package Folder and Zip File
.
XML form definition
The XML Form Definition is created automatically for you after you complete a series of changes to the form, using the online design tools in KHZ_FormGen Control Panel. If you wish to, you can opt to create the XML file manually. The name of the XML file must be in this format: “FormName”.xml, where the FormName is exactly the name of that form as declared in the FormName element: see Topic 4. 3.1.
SQL stored procedures and tables
If you have any Fields on the form that use a DataBound DataSource, you must create the tables, stored procedures and default rows of data that are used by the DataSource. The SQL file must be executed manually, although in future versions this will be automated upon install of the Form Package. You can automate this process if you also use a Custom Control, by including the SQL script in the SqlDataProvider file for that custom control when installing it in DotNetNuke as a custom module.
|