Personal tools
You are here: Home Documentation Tutorials Creating Online Forms with PloneFormGen tool Adding Elements to your Form
Document Actions

Adding Elements to your Form

This is the second part of the PloneFormGen training. It is where you learn to add elements to an existing form / form folder.

Context:


The 'Contents' tab of an existing Form Folder will look something like this:


contents_basic


At this point, we want to add any additional elements we want on the form, and arrange them in the order that we want them.

The types of elements we will go over in this tutorial include:

Boolean Field (Check Box)

String Field (Regular Text Box)

Multiple Select Field

Field Set Folder

Ordering the Form Elements


Boolean Field (Check Box)


Boolean Fields are fields where the answer is either yes or no.  On a form, a boolean 'yes' is indicated by a check inside the check box, and a 'no' is indicated by leaving the check box empty.

To create a boolean field:

1) Click on the 'add item' tab from the form folder, and select 'boolean field'.


form_boolean_1

2) Enter the yes/no question you want to ask in the 'Field Label' area.  If there is any explanation you want to provide the user, enter that in the 'Field Help' section.

3) If you want this to be a required field, check the 'Required' box.

4) If you want the field checked by default, click the 'Default' checkbox.

5) If a particular response is required in order to continue or submit the form, then check the appropriate Validator.  Otherwise, leave as 'None'.

6) Click 'Save' unless you are an advanced user, and know how to set up 'overrides'.


String Field (Regular Text Box)


String Fields are fields where the answer is to enter a line of text, such as a first name, an address or a phone number. 

To create a string field:

1) Click on the 'add item' tab from the form folder, and select 'string field'.

form_string_field


2) Fill in the field Label and the Field Help areas.

3) Check the 'Required' box if you want this field to be required.

4) Check the 'Hidden' box if you want this field to be hidden.  This is an advanced feature, and is not necessary for most fields.

5) If you want there to be a size restriction for the field (other than the default) enter that size here.  The numbers stand for characters.  If you are wanting a person to be able to fill in a 'description' type of field that requires more than 255 characters, then you probably want a 'text field' instead of a 'string field'.

6) This sets the size for the actual text box for this field.  Experiment with sizes. It does not determine how many characters can be entered (#5 does).

7) 'Validator' is if you want the computer to review the contents of the field, and to prohibit submittal unless the terms of validation are met.  There is a drop down box that allows you to select specific validators.

8) Click 'Save'


Multiple Select Field

Multiple Select Fields are fields that enable a person to select a specific answer from a list of options. 

To create a Multiple Select field:

1) Click on the 'add item' tab from the form folder, and select 'multiple select  field'.


form_multiselect

2) Enter the Field Label and the Field Help options, and check the 'Required' box if you want the user to be required to answer this form element.

3) Under default, you enter which items from the list you want the form to default as.  If you enter an item that is not on the list, it will not show it as selected when the user is presented with the options for this field.

4) Rows is for the case of 'select lists', and determines how many rows will show automatically before the user has to scroll down for more options.

5) Options is where you enter the options for this field.  You will want to separate each option with a line break.

6) The last setting on this page allows you to choose if this element is a 'Selection List' or a 'Check box List'.

7) Click 'Save'.


Field Set Folder


Field Set Folders allow you to create 'sets' of fields on your form.  In this way, you can distringuish on your form between different types of information you are asking for.  This is especially helpful with longer forms.

To create a Field Set Folder:

1) Click on the 'add item' tab from the form folder, and select 'field set folder'.


form_fieldset_folder

1) Enter the Name of the Field Set under 'Title' and any instructions or descriptions you want to have listed for that field set.

2) Click 'Save'

3) Fill the folder with items.  You can either do this by 'cutting' and 'pasting' them from another folder, or by selecting 'add item' from within the field set folder.

4) When the items are added, it might look something like this:

form_fieldset_folder_full


Ordering the Form Elements


Go to the 'Contents' tab of the form element or the field set.  You can set the order on the elements of your form in one of two ways:

form_change_order

1)  Being carefull not to click on the name of the form element (which will open that element page), select the row of the element you want changed, and drag it to the desired location.

2) Use the up and down arrows on the right-most column to move an element one space at a time.



This concludes the second part of the PloneFormGen tool tutorial.



 
by Ana Willem last modified 2007-06-28 09:38 All content on this site is licensed under a Creative Commons License.
Still Stumped?
If you've still got questions about Plone, here are your best bets for finding out more:
 

All content in this site distributed under the Creative Commons "Attribution-NonCommercial-ShareAlike" license unless otherwise noted.

Powered by Plone CMS, the Open Source Content Management System