Back
firstState
Programming
firstState
Which screen to show on startup and when phpLens is reset
Default:
Usually we set firstState to VIEW or FILTER on startup. We set it to VIEW if we want to view the grid on startup. We set it to FILTER if we want a search screen to appear on startup.

Additional Notes
If you want phpLens to create a new record on startup, set it to NEW.

If you want phpLens to edit a specific record on startup, use the URL:

$PHP_SELF?lens_$id=e&lens_p1=$primarykey

where $id is the id you passed to phpLens and $primarykey is the primary key of the record that matches $lens->keyCol.

EDITSAVE
New to phpLens 2.4.2 is the EDITSAVE state. Set firstState = 'EDITSAVE' when we want to display an EDIT screen in firstState, but after we successfully save, we want switch to VIEW.

Also see curState.

Syntax
$lens->firstState = "state";

where legal state values are: 'VIEW', 'FILTER', 'EDIT' or 'NEW'

 Basic:Yes  Advanced/Enterprise:Yes  DynamicEdit:Yes   [Version 1.0]