This is an old revision of the document!
Sample code:
<div class="alert alert-info" role="alert" id="loading-text"> <strong>Gegevens worden geladen, even geduld ...</strong> </div> <?php if ( isset($rec_data) ) { $tablefields['algemeen']['id'] = array('type'=>'modal', 'col'=>'col-12 col-sm-4', 'label_extra'=>'kort label, zonder spaties'); $tablefields['algemeen']['omschrijving'] = array('type'=>'text', 'thdata'=>array('orderable'=>'false'), 'col'=>'col-12 col-sm-8', 'label_extra'=>'langere omschrijving, mag spaties bevatten'); $tablefields['algemeen']['startdatum'] = array('type'=>'date', 'schrijf_datum_options'=>'dag_kort,maand_voluit', 'col'=>'col-6 col-md-4'); $tablefields['algemeen']['einddatum'] = array('type'=>'date', 'col'=>'col-6 col-md-4'); $tablefields['munt']['munteenheid'] = array('type'=>'text', 'col'=>'col-8 col-sm-4 col-lg-3', 'label_extra'=>'(<a href="http://www.xe.com/symbols.php" target="_blank">lijst</a>)'); $tablefields['munt']['muntsymbool'] = array('type'=>'text', 'col'=>'col-4 col-sm-2 col-lg-2', 'label'=>'symbool'); $tablefields['munt']['wisselkoers'] = array('type'=>'float' ,'col'=>'col-12 col-sm-6 col-lg-4'); $tableoptions['data'] = array('order'=>'[[3,"desc"]]'); ?> <?php include ("includes/table/table.php"); ?>
$tablefields[tabname][label] = array(
type⇒
text
: defaultdate
: adds 'data-order=' to <td> and uses schrijf_datum
for valueschrijf_datum_options
float
Sample code: zie hierboven bij Table
$tablefields[tabname][label] = array(
col⇒bootstrap grid
label⇒label
(default=label zoals in $tablefields opgegeven)label_extra⇒extra informatie achter label (in <small>)
placeholder
data-trigger="event"
: will trigger event after updating value with val()
data-trigger="change"
, which can be captured by $("element").on('change', function() { …
.readonly
: field will not be sent to ajax/process.php for updating.hidenew
: field will not be sent to ajax/process.php for updating when #modalId == -1 (new record)data-fieldformatting='JSON-object
': return value will be reformatted in ajax/process.phpstrftime
, bv. data-fieldformatting='{"strftime":"%a %e %b %Y"}
'PNotify.prototype.options.styling = "bootstrap4";
to top of Javascript