HOW TO edit existing records?

Talk and info about common issues

Moderator: alexandrleonenko

administrator
Site Admin
Site Admin
Posts: 6010
Joined: Jan 7th, '09, 23:18
Contact:

HOW TO edit existing records?

Postby administrator » Jun 30th, '11, 15:14

To edit existing record you have to do following:

1. Enable Edit mode (with "edit"=>true):

Code: Select all

$modes = array(
     "add" =>true,
     "insert" =>true,
     "preview" =>true,
     "edit" =>true
);
$dform->SetModes($modes);   


2. Set ID for editing record (where ID is a record ID value):

Code: Select all

$df_rid = ID; 
$dform->SetEditRid($df_rid);

Return to “ApPHP DataForm {HOW TO}”