Goto main content

Widgets

Create or modify a table

 

The table can store datas either directly in the admin part of your site or from a form on the frontend. The table is stored in the database and has fields, elements which collect the various information. In this part, we will explain how to create a table and fields that can be used for example in forms on the site (see section widget > xform).

Creating a table

In the list of tables that appears, click on the link "Add" located in the top menu. Below is the list of fields and how to fill them:

  • Table name: in this field it will be necessary to indicate the name of the table. This is the identifier used by the system to select or use the table. This name SHALL NOT contain spaces, accents, special characters, etc. Example of a table name: my_new_table
  • Table label : The label of the table is actually the name you want to use to refer to your table in the admin part. This one has no restriction, it can contain all types of characters. In a word, the label is the identifier that you use for your table, the name is the identifier used by the program.
  • Module: U can add an existent module to your table
  • Fields list: this button allows you to create your different fields. While waiting to create your table, do not click on this button! (Ideally, create the table, save it before clicking this button).
  • Embed: If you want to embed a script
  • Menu: The location of your table in the backend menu.
  • Language: In the case of a multilingual site, extenso is configured by default to support English and French. In this case, choose "Extenso", if you have more than two languages, or a language different from one of these two languages, choose "site" instead.
  • With position ?: Enable the possibility to change fields order
  • Predefined searches: Predefine search queries
  • Unique table without a list page: If your table will have only one information
  • Database: Choose the database where your table will be saved (leave the default value)
  • Charset: Choose the charset
  • Collate: Choose the Collate
  • Create initial entry: Enable the creation of an initial entry
  • Engine: Choose the engine
  • Help tab: This tab can contain informations about the table for admins.
  • Permissions tab: This tab contains information about permissions granted to different user roles.

Once important fields are filled, your table is created. Then click save in the top of the page menu (and not save and publish if you just created your table)

Create a new field

Fields are used to collect information from the website or directly from the backend. Information that is then stored in the table (created previously).

To create a new field, click on Dev> Database Management> List of Tables. Find your table and click the "Fields" button (see image above), and then "add" in the top menu. These are the main elements.

General tab

  • Field Name : Choose the name of the field. This is used by the system to select or use the field. This name SHALL NOT contain spaces, accents, special characters, etc. Example of a field name: my_new_field

  • Field label : The field label is actually the name you want to use to recognize your field. This one has no restriction, it can contain all types of characters.

  • Tabname : If you want to display your form in two or more tabs, write here the name of the tab where this field will be displayed. Leave this field blank if you do not want to have tab view.

  • Display on index ?: If you want to display this field in the results list of your table. Example on the image below the fields: "UID, Action, Statut du ticket, Email et Type de demande" are on the index page.

  • Active : if you want to activate your field

  • Add as as filter? By checking this box you allow a search on this field. In the example above, if "add as filter" is checked for "Request type", you can search through ​​in this field.

  • Multi-language field: if your field is a multi-language field

  • Database format: To choose the format

  • Field length in database: Default on 255, but maybe changed

  • Display format : How your field is displayed in the form (check box, drop-down menu, multiple selection, file download, etc.) You can choose to import data from another table or create a new list of element. (drop-down menus for instance). Depending on the choices you made, additional fields may be displayed.

Validation Tab

You can use different kind of validation system. For example, on an email field it's possible to apply an email validation. It is also possible in this tab to insert regular expressions, to define minimum and maximum values ​​etc ...

Help Tab

You can choose to add an explanation for your field. Two different modes are available. Field Information which is displayed under text fields only and help which is represented as an icone with a tooltip information. This one can be added to any kind of field.

Index Tab

Configure the index view

Display Tab

You can manage different display options. For instance, define whether a field controls another one or is controlled by another one. (For example, if you want to display this field only when a given value is selected in another field.

Javascript

Here you can add javascript functionalities. Can be used to add more validation options for example.

Rights

Manage user role for this field.

© 2024 extenso Inc. All rights reserved.