Drop Down List
The Drop down list is a very versatile control. This requires many other controls for you to set the list values. It can contain various lists of information from which a user can select a single selection.
How is the DataSource Populated?
This setting defines how the list with in the control is populated. Depending on the list, you may want static values, in which case you can define the list while creating the form or you may want the values to be dependant on some outside factors, such as the file list in a folder, or the data within a table in your database. The following selections are available to populate the list.
a. A List of Items
This is static and cannot be changed; you define the list while creating the form, using the controls listed below
-
Text of List Item – this is the text seen by the user in the control
-
Value of List Item – this is a hidden value that you can set that will be passed to the database and corresponds to the text value shown to the user when that text value is selected
-
Is Selected by Default – select this to have the text value be shown by default when the form is displayed
To enter the list items simple fill in the textboxes for Text and Value of the list item, and click ‘Add Item to List.’ The list will be displayed for viewing and editing below. To remove a list item, click the ‘Delete’ button beside the item.
b. A Stored Procedure
This selection will allow you to dynamically fill the control list with values by using a stored procedure from the database. The stored procedure must pass a datatable with two columns of data, one that contains the text data for the field the other may contain the value data, but is not necessary unless you plan on using it elsewhere in the form for data. The following settings are required should you choose to use a stored procedure to fill your control list:
-
Sproc Name – this is the name of the stored procedure in the database. It must be EXACTLY as it is in the database
-
DataTextField – this is the name of the datafield in the returned datatable that will fill the text value of the control
-
DataValueField – this is the name of the datafield in the returned datatable that will populate the value of the control
Note: Stored Procedures must be created outside of KHZ_FormGenerator and cannot be inserted to the database from KHZ_FormLoader. Please see your website Host or Administrator to have your stored procedures inserted into the database.
c. The Files in a Folder
This selection will allow KHZ_FormLoader to search the file structure of the web server to a specified directory and will use the names of the files within that folder for the text field
Return on Selection
This setting defines whether to return the text or hidden value of the control selection when the form is submitted.