Forms: Difference between revisions

From nuBuilderForte
Jump to navigation Jump to search
No edit summary
Line 101: Line 101:


==Redirect To==
==Redirect To==
Open with different Edit Form if required.
 
Redirects the choice made from a Browse Form to this Edit Form.


==PHP Code==
==PHP Code==

Revision as of 17:37, 15 December 2017

The first thing you will see after logging into nuBuilder Forte is a nuBuilder Launch Form containing Button Objects that will take you to other Forms.

This is also referred to as a Home Page.

There are 5 types of Forms.

  1. Browse - A selectable list of records from a database table - used by a Lookup Object.
  2. Edit - An area displaying editable fields from a record in a database table.
  3. Browse and Edit - A Form to select and then edit a record in a database table.
  4. Subform - An Edit Form that is repeated inside a Subform Object.
  5. Launch - A Form not associated with a database table.


You can build a Form (and create a Button to Access that Form) the easy way using the Form Builder.

OR...

You can create a new Form the long way by...

  1. Clicking the Form Button on the Setup Tab of the Home Page.
  2. Clicking the Add Button at the top of a Browse Form.
  3. Filling out your new Form's properties (see below). We suggest you make your first Form a Browse and Edit.
  4. Clicking the Save Button at the top of its Edit Form.
  5. You will need to add a Button to the Home Page so users can open it.
  6. And then you'll want to add some Objects to your new Edit Form, for displaying and editing fields.



Form Properties

Form Type

Choose 1 of the following.

  • Browse - Used by a Lookup Object.
  • Edit - Used to display editable fields from a record in a database table.
  • Browse and Edit - Used to find a record and then display it.
  • Subform - Used inside a Subform Object.
  • Launch Used...
    • As a Home Page
    • A Form to display other nuBuilder Objects
    • For adding criteria to a Report.

Code

A unique code of alphanumeric characters.

Description

Form description.

Table Name

The database table containing records and fields to display.

This is not required for Launch Forms.

Primary Key

The Primary Key belonging to the selected Table.

This is not required for Launch Forms.

Tabs (Subform)

All Form types, apart from Browse Forms, require at least one Tab.

Tabs are arranged horizontally above the editable area of an Edit Form.

Tabs allow users to navigate (what seems like) different layers on the same Form.

Title

Tab Title

Order

Displayed order of the Tabs. - Every time the Form is saved these records this will be reordered and renumbered in multiples of 10.

Help

Javascript that can run to help the user eg. window.open('www.help.com.') or nuMessage(['You must fill in','all fields.']);

SQL

If you want any help building SQL, the SQL Button will direct you to nuBuilder's SQL Builder.

This SQL is used to display records on a Browse Form

OR

used by Subform Objects to order records inside the Subform.

Columns (Subform)

Title

Column Title

Display

Table Field Name

Align

Left, Right or Center

Format

Used for formatting dates and numbers - The Formatted part of results are not searchable. (Don't search for a $ if it's not in the actual record.)

Width

Width of column

Order

Order of column. - Every time the Form is saved these records this will be reordered and renumbered in multiples of 10.

Row Height

Height in pixels

Rows Per Page

If '0' then all rows will be displayed, if a number fewer than the rows in the database, it will show the remaining rows on a separate page

Redirect To

Redirects the choice made from a Browse Form to this Edit Form.

PHP Code

PHP code can be added at the following places on a Form.

  • BB - Before Browse
  • BE - Before Edit - not available in Subform Forms.
  • BS - Before Save - not available in Subform or Launch Forms.
  • AS - After Save - not available in Subform or Launch Forms.
  • BD - Before Delete - not available in Subform or Launch Forms.
  • AD - After Delete - not available in Subform or Launch Forms.


These sections are explained in the flowchart below.

Javascript

A Textarea containing Javascript code - not available in Subform Forms.

To edit this, double click on the Textarea and you will open Ace Editor in a full screen.

This Javascript can be used on all Forms except for Subforms.


JS in the flowchart below. Click to view larger