Using Components > Creating forms using components > Planning the form

 

Planning the form

You should determine the following criteria before you begin building a form:

Which elements your form needs

What data each form element displays and gathers

Where each user interface element appears in the form

How the user will navigate the form

Once you have determined the elements in your form, you can develop a data model to gather and store the data. The gathered data is displayed in the form and enables form elements as the user navigates through the form. When the user submits the form, the data is transmitted to a database.

The following table lays out all of the code elements used in the FormExample.fla, including the functions they perform and the ActionScript elements they reference in the code. This table is an aid for examining the code in the in the sections that follow it, and an example of how to plan and organize forms you create.

Form element

Function of element

ActionScript reference

Page 1

Gather user information

pg1updateUIFromDataPg1

 

Name input field

Gather user name

name_txt.text - field nameField - object property

Gender radio buttons

Gather gender info

genderGroup - componentgender - object property

City drop-down list

Gather city info

city_mc - component; cityIndex -object property; cityTable - array for component

Next button

Take user to page two

pg1next

Page 2

Gather interest information

pg2updateUIFromDataPg2

Information request check box

Enable interest list menu and flag user for more info

junkCheck_mc - component junkMail - object property

Interest list menu

Gather interest data

interest_mc -componentinterestIndex - object property; interestTable - array for component

Next button

Take user to page three

pg2next

Previous button

Return user to page one

pg2prev

Page 3

Display user and interest information

pg3updateUIFromDataPg3

Title - static text

Display "Finished" message

N/A

Name - dynamic text

Display user name

resultsName_txt.txt - display field name

Gender - dynamic text

Display Gender radio button selection

resultsGender_txt.txt - display field name

City - dynamic text

Display City combo box selection

resultsCity_txt.txt - display field name

Interests - dynamic text

Display Interest list menu selection

resultsInterest_txt.txt - display field name

Previous button

Return user to page two

pg3prev