function setPostAddJavaScriptFunc()
Set the name of a javascript function to call after each multiedit item is added
The JavaScript function is called with the following arguments:
$div jQuery element for the outer div
data Array of field data OR null for a new record
idx The record index Usagevoid MultiEdit::setPostAddJavaScriptFunc ( string $function_name ); Example// You can use bare functions
MultiEdit::setPostAddJavaScriptFunc('alert') Example// Or object functions (this is good for testing)
MultiEdit::setPostAddJavaScriptFunc('console.log') Example// If you're insane, you can put a whole blob of JS in there
MultiEdit::setPostAddJavaScriptFunc('(function($div,data,idx){ console.log($div); })') Arguments- string $function_name
Return value
|