CodeCharge Studio

EditMode Run-Time Property (PHP)

Applies to

Record Form, EditableGrid Form

Type

boolean

Access

read-only

Syntax

object->EditMode

Description

This property determines whether given record form is currently in edit or insert mode. In edit mode all data source parameters need to have values assigned (including row identifier). In insert mode not all have to be assigned values.

Examples

The following example shows how to hide a dependent form on a page when the main form is not in EditMode.

global $items;
global $item_prices;
  if (! $items->EditMode)
  {
     $item_prices->Visible = false;
  }
where $items is the name of the main form, and $item_prices is the name of the form that shows elements that depend on the data in the main form.

Other examples

Examine Form's Mode,
Dynamic Login Field in a Registration Form

See also

Errors Property
FormSubmitted Property
PressedButton Property


On-line, printable versions and updates