Home
LOGIN or Create Your first site
Manual

Entering Data 

There are several ways to enter data into your database: 

Add it in the data manager - to add data in the data manager click the button on the button bar. This will add a row to your database. Double-click a field to add your data to it 

Add it using a form - this is the more normal way of entering data into the database. See the example below: 

Creating a form to store data 

Forms are a good way to collect information from users of your web service. 

This quick example shows you a quick and easy way to create data collecting forms. 
When you want to store information you need: 
A place to store the data - normally a table in the data manager 
A form with form elements for collecting the information you would like to store 
A component that handles the results 

 

Creating the data table 

creatingdatatable

Before we start to create a form, we need to define the table into which the data will be stored. 

open the Data Manager tool and click ʻ+ʼ in the Data Tables tray on the topleft.

type the name for your table and click SAVE 
decide what information you want to collect and add the corresponding data fields to the data grid by clicking the ʻ+ʼ next to the id field. 
type the name for your field and click SAVE. Repeat this for the number of fields you would like to store. 

 

Creating the form 

CreatingtheForm

Drag the ʻFormʼ element from the element tray. This will display the Settings box for the form element, but there is no need to specify additional information for the form at this stage. 

SettingsData

Next, drag content elements (e.g. table, text, image) and form elements (e.g. text input, select box, text area, rich text area, radio button, file upload, checkbox) from the element tray into the form. Arrange them to create your form as you would like it to appear. In this example we collect the usersʼ Name, Email, Password (+ a confirmation) and Favorite Color. 

When inserting the ʻText Inputʼ element, we define in the Settings: ʻNameʼ field the attribute for each piece of information by typing “form[“data object name”]. The ʻdata object nameʼ has to be the exact name you gave in the database. For example: for the Email field we type in form[Email], where Email is the data object attribute name defined in he data manager. 

For the button, add the ʻButtonʼ element and choose ʻSubmitʼ in the Type field. You can add text to the button by filling in the Value field. 
Remember to press save and then preview to see how your form will look. 

To store data from the form we need to add two things to the form settings: 

Open the form element Settings box and select the ʻAttributesʼ tab and next to the method attribute type ʻpostʼ 

This sets the form to send its inputs to an array that will be saved in the data table created above. 

formsfields

 

Save the data 

The final phase is to create a component to save the data and provide a message that the action completed successfully.

 

Create a new content component an call it ʻSave Example Formʼ 

Add an ʻObject Interfaceʼ element  (under Data Handling) and select the Class as the name you provided for your data table from the drop-down list. 

Then set the Class method to ʻadd (static)ʼ and value to a ʻPost Variablesʼ called ʻformʼ. Click OK to save these settings. 

Finally add a text element with the words, “Data saved!!” and then save the component. 

Now you can test your input form. Open the example form you created, enter some data and hit the button you created. Your screen will change to the new component

you created with the message “Data saved!!”. If you go to the Data Manager and open your table you will see your data in the table. 

Product

Tour
Pricing
Sign Up
Support
API
Tutorials
Company

About
Contact
Management Team
Terms of Service
Privacy Policy
Press
Community

Forum
Blog
Twitter
Facebook
Youtube
Vimeo
Flickr
Goodies

Awards

EEVC MindTrek Tekes
Nordic Venture RED HERRING SIME AWARDS