You are here: Home Resources Articles PloneFormGen Adding a String Field

Adding a String Field

Learn how to add a versatile and commonly used field type: the string field. The string field creates a simple one-line text box for uses ranging from Full Name to Email to Favorite Color.

Navigate to your Form Folder and click Add Item. Select String Field from the drop-down menu.

The string field creates a simple one-line text box. Some common uses for this field type are:

  • First Name
  • Last Name
  • Email
  • Street Address
  • Lots more!

 

Basic Field Info

Many field types have the same information on their edit screen. Here's an explanation of each of these:

  • Field label - The title of the field.
  • Field help - Some text you can provide to the form submitter to help them figure out what you're asking for.
  • Required - Is this a required field?
  • Hidden - Is this a hidden field? This is useful for passing data back to yourself.
  • Default - You can supply a defult value that the form submitter can change if they wish.

Other types of information can be defined for other field types, and we will cover those as they come up. Since we're talking about the string field, let's take a moment to talk about validation.

Validators

Validation is a feature common to many web forms. A validator checks that the input being provided conforms to a particular format. For example the "email address" validator simply checks that the input contains an @ sign (i.e. contact@groundwire.org). There are a set of standard validators available for string fields such as: Valid US phone number and Valid zip code.

In practice validators can be helpful, but in some cases they may be too restrictive. If your site visitors are from outside the US, they mey become frustrated with trying to get past US-centric form validators!

 

PloneFormGen Editing Environment

After you create your first field, you'll be taken to a special editing interface for PloneFormGen that makes working on a form a bit easier. In this view, you can edit, rearrange, or delete fields easily instead of having to use the Contents tab (as you would for other folders in Plone).

If you want to see the form the way that your site visitors would, you can click on View in the taskbar or click the "return to form" icon in the upper-right corner of the editing screen. Likewise you can get to the editing environment from the normal view, by clicking the "wrench" icon.

Return to normal View

Enter form editing environment

Note that you cannot complete or submit the form when working in the editing environment. You will need to return to the normal form view first.

 

 

 

Contact Us

David Averill
Director of Consulting Services 
davida@groundwire.org 
(206) 286-1235 X 18

Signup for our Newsletter
and get Groundwire tips, tools and news sent directly to your inbox.
Privacy Policy
Support Groundwire

It's simple. We depend on you to help social change groups do their social change thing.

Donate
Support Groundwire

It's simple. We depend on you to help social change groups do their social change thing.

Donate