Field Change Event

This page introduces events related to changing field values and adding or deleting table rows.

Event after changing field value

Event
pd.change.[fieldID]
Properties of the Event Object
Property type Description
type String The event type.
container DOM
Field outside the table:

DIV element at the bottom of the work area.

Field in the table:

Table row to which the field belongs.

<div class="pd-scope"></div>
Field outside the table of injector:

MAIN element.

<main class="pd-scope"></main>
record Object

The record object.

A record object is an object that contains record information such as field codes and field values.

References:

Field types

viewid Number Applies only to in-table fields and the value is a row index.
Sample
((APP_ID) => {
	"use strict";
	pd.event.on(APP_ID, 'pd.change.field_1_', (event) => {
		console.log(event);
		return event;
	});
})(pd.APP_ID);

By changing the contents of the record property of the event object and returning it, you can change the value of the field and disable or hide the field.

References:

Event Object Actions

Events before adding table rows

Event
pd.row.add.[fieldID of the table field]
Properties of the Event Object
Property type Description
type String The event type.
container DOM

The table element.

<table class="pd-table"></table>
record Object

The record object.

A record object is an object that contains record information such as field codes and field values.

References:

Field types

viewid Number The row index to be added.
Sample
((APP_ID) => {
	"use strict";
	pd.event.on(APP_ID, 'pd.row.add.field_9_', (event) => {
		console.log(event);
		return event;
	});
})(pd.APP_ID);

By changing the contents of the record property of the event object and returning it, you can change the value of the field and disable or hide the field.

References:

Event Object Actions

The addition is canceled by returning the event object with the error property set to true.

Events before copying table row

Event
pd.row.copy.[fieldID of the table field]
Properties of the Event Object
Property type Description
type String The event type.
container DOM

The table element.

<table class="pd-table"></table>
record Object

The record object.

A record object is an object that contains record information such as field codes and field values.

References:

Field types

viewid Number The row index to be added.
Sample
((APP_ID) => {
	"use strict";
	pd.event.on(APP_ID, 'pd.row.copy.field_9_', (event) => {
		console.log(event);
		return event;
	});
})(pd.APP_ID);

By changing the contents of the record property of the event object and returning it, you can change the value of the field and disable or hide the field.

References:

Event Object Actions

The copy is canceled by returning the event object with the error property set to true.

Events before deleting table row

Event
pd.row.del.[fieldID of the table field]
Properties of the Event Object
Property type Description
type String The event type.
container DOM

The table element.

<table class="pd-table"></table>
record Object

The record object.

A record object is an object that contains record information such as field codes and field values.

References:

Field types

viewid Number The row index before deletion.
Sample
((APP_ID) => {
	"use strict";
	pd.event.on(APP_ID, 'pd.row.del.field_9_', (event) => {
		console.log(event);
		return event;
	});
})(pd.APP_ID);

The deletion is canceled by returning the event object with the error property set to true.

Events before sorting table

Event
pd.row.sort.[fieldID of the table field]
Properties of the Event Object
Property type Description
type String The event type.
container DOM

The table element.

<table class="pd-table"></table>
record Object

The record object.

A record object is an object that contains record information such as field codes and field values.

References:

Field types

fieldid String The field ID of the field to be sorted.
Sample
((APP_ID) => {
	"use strict";
	pd.event.on(APP_ID, 'pd.row.sort.field_9_', (event) => {
		console.log(event);
		return event;
	});
})(pd.APP_ID);

The sorting is canceled by returning the event object with the error property set to true.

Event after expanding the box

Event
pd.box.open.[fieldID of the box field]
Properties of the Event Object
Property type Description
type String The event type.
container DOM

DIV element that is the box field.

<div class="pd-box"></div>
Sample
((APP_ID) => {
	"use strict";
	pd.event.on(APP_ID, 'pd.box.open.field_10_', (event) => {
		console.log(event);
		return event;
	});
})(pd.APP_ID);

Event after collapsing the box

Event
pd.box.close.[fieldID of the box field]
Properties of the Event Object
Property type Description
type String The event type.
container DOM

DIV element that is the box field.

<div class="pd-box"></div>
Sample
((APP_ID) => {
	"use strict";
	pd.event.on(APP_ID, 'pd.box.close.field_10_', (event) => {
		console.log(event);
		return event;
	});
})(pd.APP_ID);