actionName

Since: Editor 1.9.1

Change the parameter name used to indicate the CRUD action on form submission.
Please note - this property requires the Editor extension for DataTables.

Description

Occasionally, when integrating Editor with an existing system you might find that the parameter name Editor uses to communicate its intent to the server (action) is already used for something else. For example WordPress uses action for its own intent.

This parameter makes it possible to easily change the name of the intent parameter. The only time you would use this option is if you want to submit data with something other than action in the request.

Note that the server-side must expect the newly named parameter. Only our PHP library currently supports the ability to change to use a different parameter name through the Editor->actionName('...'); method. The .NET and NodeJS libraries do not support this method (we've not found a need for it yet!).

Type

string

Value to use as the parameter name in the data submitted to the server.

Default

  • Value: action

The default is simply action.

Example

Change action name to a custom value:

var editor = new DataTable.Editor({
	ajax: 'php/staff.php',
	table: '#myTable',
	actionName: 'editor',
	fields: [
		// ...
	]
});