Universal Form Object
Universal Form Object (UFO) can help a web developer do the following:
Your HTML form can be located on the internet, intranet, or extranet. UFO will still function the same way.
- Save HTML form data in a database.
- Retrieve the security login user ID information when the HTML form is located on a secured site and submitted.
- Add/Delete fields to the UFO when the HTML input fields are changed.
- Email the submitted data to several email addresses, including the user.
- Export the saved data according to a date range to a comma delimited text file.
- Purge the saved data according to a date range.
- Reuse any UFO for a new application or similar project.
Having your HTML form protected by a security login allows you to do the following:
- Choose to send an email to the user who has submitted the HTML form.
- Choose to have the database save the user's ID, identifying who submitted the HTML form.
If your HTML form is not protected by a security login, the submitted data will be anonymous. In addition, you will not be able to send an email to the user. After submitting, an error will occur if the security login function is selected in the UFO setup and the user has not logged in through the security login prior to reaching the HTML Form.|
Whether your HTML form is protected or not protected by a security login, you will be able to send an email to several addresses that you identify during the setup of a UFO.|
Setting up a UFO
- Make your HTML form and name each input field.
- Go to the UFO Control Panel by logging in through the security login. Scroll down to Create a UFO section.
- Create a new UFO by entering the number of input fields that are in your HTML form. Click NEXT >
|| By checking the Encrypt my Form data checkbox would encrypt the data submitted for this form. This can not be changed while updating the form.
- Enter the billing information for your UFO. This is now just the Owner User ID, the Owner Unit Code and Owner Department Number will be populated by the application after being saved. The Owner User ID can not be left blank and must be valid. Enter a name for the UFO, a description, and two other owners (optional). Define the field names your HTML form will send to the UFO. Select which fields should be required for the user to fill out. If your HTML form is protected by a security login, select whether you want the user ID to be saved with the submitted data or whether to keep the information anonymous. If you want to send an email to someone every time data is submitted, select the format you would like to send it in. The UFO default setting for character encoding is ISO-8859-1. If your form uses UTF-8 character encoding please change the default UTF-8. Check your browser's encoding settings to determine the proper selection. Click NEXT >
- Copy and Paste the form action tag into your HTML form. If your form uses UTF-8 you will see a META tag code line to copy and paste in the HEAD section of the HTML source. Click NEXT >
- Specify the Thank You HTML, or use a Meta tag refresh to bounce the user back to your website. If your form uses UTF-8, a META tag should be included in the HEAD section. Fill out the email, putting a semi-colon after multiple email addresses. By inserting variables that represent the submitted data into the Thank you HTML & Email, you can create dynamic content for the user and email recipients. Click NEXT >
- The UFO has been setup, but it needs to be tested. Close all the browser windows you have open to end your security login session. Open a new browser window and surf to the location of your HTML form, logging back into the security login if the HTML form is protected. Fill out the form with test data in each field and submit it. Check to see if the Thank You HTML works correctly. If the Thank You HTML needs to be updated, go to the UFO Control Panel and Modify the UFO Setup.
- If you selected the email feature for the UFO, go to your email client and read the email that was sent, looking for any problems. If the email needs to be updated, go to the UFO Control Panel and Modify the UFO Setup.
- Go to the UFO Control Panel and, using a valid date range, export the submitted data in the UFO for viewing. Verify that all the fields are recording data in them. If any field does not have data, verify that data was submitted for that field. Also check to see if the field names in both the HTML form and UFO are spelled the same.
Definition of the HTML form
You must have an existing HTML form or create a new one. UFO does not build this for you. UFO can accept the following data types from the HTML form:
- Textarea (line breaks ignored)
- File (will only accept the path location in the filebox, no file will actually be uploaded)
- Select box
- Combo box
- Name each HTML input field. Example: <input type="text" name="ZIP Code">
- During the setup of a UFO, you will need to copy the <form action=" "> tag that is generated, and paste it into your HTML form. This generated form action tag can change anytime you create or modify a UFO. Make sure your HTML form is pointing to the right place.
Analysis of the UFO Control Panel
UFO Name - Displays all the UFOs you currently own. Select one and then choose the action you want to perform on it.|
Modify UFO Setup - Changes the settings of an existing UFO. To delete an input field from a UFO, make the field name blank. During any modification, cycle through all the screens, clicking the NEXT > buttons, until you come back to the UFO Control Panel. This should be done so a UFO does not become locked. This is a similar process to Setting up a UFO documentation.
Delete UFO - Erases the database and the UFO setup. The form action tag in your HTML form will not work after this is executed.
Unlock UFO - It becomes locked when a person begins to modify a UFO, but does not cycle through all the screens. To verify a UFO is not being modified by another owner at this point in time, select a UFO that is locked and try to modify it. You will be able to work with a UFO once it has been unlocked.
Add fields - Inserts new fields into an existing UFO. This is a similar process to Setting up a UFO documentation.
Save As - Enables reuse of any UFO, that you own, by saving it under a different UFO name.
Export Data - Creates a comma delimited text file of all the submitted data within the given date range. The opportunity to either save the file or view the file will take place. Save the file as filename.csv. The file can be viewed in Notepad or imported into Microsoft Excel.
Purge Submitted Data - Erases the contents of the database within the given date range. If all data is purged, the UFO will remain in tact and the form action tag in your HTML form will continue to work.
View UFO Setup - Lets you see all the UFOs that exist beyond your ownership.
Save As - Enables reuse of any UFO, beyond your ownership, by saving it under a different UFO name and giving you ownership.
Create a new UFO - This builds a new UFO with the number of input fields you want to define. Refer to Setting up a UFO documentation for the process of this function.
Tips & Tricks
Let's say you had an HTML form with hundreds of input fields. It would take forever to type in all the field names in the UFO Setup! And what about if you made a typo? It would be great if a new UFO could detect the fields coming from the HTML form and put them into a UFO setup. Well, things are really great then, because UFO can do this!
- Make your HTML form just as you always have, naming each input field. However, you can not have an input field equal to the name 'new' . Naming a field 'new2' would be OK though.
- Go to the UFO Control Panel by logging in through the security login. Do not close this browser during this process.
- Copy the URL address of the UFO Control Panel, and paste it into the form action tag in your HTML form. Add ?new=1 to the end of the URL so the last word looks like UFOAdmin?new=1.
- Browse to your HTML form and submit some test data from each input field. Make sure each field, checkbox, or radio button grouping has something selected or filled in, otherwise UFO may not detect the field names correctly.
- UFO will automatically detect the fields that sent data, and extract the field names into the UFO Setup. You will not need to enter each input field name.
- Continue setting up the UFO as you would normally, following the remaining steps of the Setting up a UFO documentation. Do not forget to change the form action tag to the one generated from the UFO Setup.