Delete - Option Type D

How to Delete a row on Table Views

When adding the option type D to a table view, each row will have a delete option in the tool bars of the far right.

To add the delete tool, from the init Sections module add the option type D.

$PAGES_CONTENT->setOption("PAGES,VER PAGINAS,VOIR PAGES","aside","5","VD", true);

Or use the manual value directly in the page

$options['delete']  = true / false;

Once the option type is setup then we need we have several options to control what things to clone or not, if this variable is left empty then everything will be cloned.

$deleteOption = [
   'column' => 'INVOICE_NO', // The value of a column that will be used in the prompt
   'prompt' => 'Invoice #' // The text that will be used in the prompt before the column value
];

In this example the prompt will say:

// "Are you sure that you want to delete Invoice # 12345?" (where INVOICE_NO = 12345)

If $deleteOption is not declared the prompt will use the ID name and value of the row:

// "Are you sure that you want to delete CLID 12345?"