|
To update multiple records on the list page at the same time you
can create new button, choose records and click 'Update selected'
button.
Note: Change the values listed in
red to match your specific needs.
1. Proceed to the Visual
Editor page.
2. Switch to HTML mode and find the line {BEGIN delete_link}.
Add the following code right before it:
<SPAN class=buttonborder>
<INPUT class=button onclick="frmAdmin.a.value='update'; frmAdmin.submit(); return false;"
value="Update selected" type=button>
</SPAN>
|
3. Add the following code to the List page: Before record deleted
event. Let say you need to select several employees and assign the
manager named Bob
Smith.
global $dal;
//delete records
if(@$_POST["a"]=="delete")
return true;
//update records
if(@$_POST["a"]=="update")
{
// set ReportsTo field to 'Bob Smith'
$sql = "Update employees set ReportsTo='Bob Smith' where " . $where;
CustomQuery($sql);
}
return false;
|
|