set_col_default()

  • Parameters:
    • $col_name: column name
    • $default: column default value
  • Description:
    • Set column default value This option is only valid for Form Editing when adding a new record. Users can override this entry.
  • Remark:
    • To set the default value for edit existing records, use beforeEditRow event.  Be sure to set default only when the value is blank otherwise any populated values entered by users would be overwritten.
  • Example:
1
2
$dg -> set_col_default('direction', 'top');
$dg -> set_col_default('dateField',  date("Y-m-d H:m"));