Cutting value in editor
Cutting value in editor

Hi
How i can cut value in editor?
Something like this
https://datatables.net/blog/2016-02-26
but for editor.
editor = new $.fn.dataTable.Editor( {
ajax: "ajax.php",
table: "#example",
fields: [ {
label: "ID:",
name: "table.id"
}, {
label: "Name:",
name: "table.name"
type: "select"
// substr his data
}
Can cut in js file or in php Field::inst
This discussion has been closed.
Answers
Do you mean you want to show the
label
with ellipsis? Or you actually want to truncate the data that is being saved to the database?For the former, if you are using our PHP libraries and the
Options
class to populate the select list's options, you can use therender
option to modify the label that will be shown.For the latter, you would use a set formatter.
Allan
I have very long names of rekords. When I have to set up references (parent record) in editor by select there is problem bacause input field is too long (select input width is 3 times bigger than the rest). I want to trim this data but only in editor. Data in table are ok bacause there is a line break.