Terug naar overzicht

JS API

Voorbeelden

Set field label and layout

const field = PeggyPay.getField("myFieldName");
field.setLabel("New label");
field.setLayout("1/3");

Enable a field only when it is later than 12:00

PeggyPay.getField("radio").setVisible( new Date().getHours() > 11 );

Oninit event

field.oninit.add( function()  ..  );

Onchange event

const field = PeggyPay.getField('myFieldName');
field.onchange.add( function(field) {
    alert(field.getValue();
    yourcode...
} );