Render Functions:

For general infos, see the datatables.net documentation. https://datatables.net/manual/data/renderers

 

Example Renderer Function
function (data, type, row) {
	return data;
}

We use predefinded types for our datatable configurations as follows:

Build in Types:

  • Number
  • Text
  • Date
  • Adress
  • Time
  • Phone
  • RichText
  • E-Mail
  • File
  • DateTime
  • Boolean
  • Currency

#NUMBER – ID1

Renderfunction for Numbers

#TEXT – ID2

Renderfunction for text

#DATE – ID3

Renderfunction for E-Mail Addresses

#ADDRESS – ID4

Renderfunction for Formidable Address Fields

#TIME – ID5

Renderfunction for Time

#PHONE – ID6

Renderfunction for Phone Numbers

#RTE – ID7

Renderfunction for RichText

#EMAIL – ID8

Renderfunction for E-Mail Addresses

#FILE – ID9

Renderfunction for Files

#DATETIME – ID10

Renderfunction for DateTime

#BOOLEAN – ID11

Renderfunction for Boolean Values. 

Value 0
Value 1

#EMAIL – ID12

Renderfunction for currency euro

But you can easyl build your own render function and add it in the DataTable Field Settings.

Example Function to Render a Field with the JavaScript Number Format for Euro
function (data, type, row) {
	if (type == 'sort') {
		return data;
	}
	if (data) {
		const formatter = new Intl.NumberFormat('de-DE', {
        style: 'currency',
        currency: 'EUR'
      })
     return formatter.format(data);
  }
 	return data;
}