edit title, (using duplicate record example)
edit title, (using duplicate record example)
I am using the duplicate record example http://editor.datatables.net/examples/api/duplicateButton.html
The actual duplicate part works exactly as intended.
The only text field in my editor instance is a 'notes' field, which works if i use it, (though not very useful) eg
editor
.create( {
title: 'Duplicate '+values['tblitem.ItemNotes'],
buttons: 'Create from existing'
} )
My other field values are integers which display select lists.
The title will display 'undefined' as a value, whatever i choose here, whether its the select list value (eg 'tblitem.ItemTypeID') or its label (refitemtype.ItemTypeDescription)
This question has accepted answers - jump to:
Answers
Can you give me a link to the page showing the issue so I can debug it please?
The labels won't be available in the
values
since they are not form values - they would need to be looked up from the IDs or perhaps it might be easier to read the select label for the selected option. However, that doesn't explain why the ids aren't appearing. Are they part of a join and you need another parameter name in there perhaps?Allan
Hi Allan,
will send you a PM
Super - thanks!
This is what the
values
object contains:There is no
tblitem.ItemID
field which is why you are getting an undefined "value" in the title.If you were to use
'tblitem.ItemTypeID'
then it should work.What is the data you actually want to show in the title?
Allan
Thanks Allan.
I can confirm it works with ItemTypeID
I realise now, looking at the editor fields why it didn't work before
I want to display the item type description. which is in my json source
So I can just add this as a hidden, readonly field into my editor instance ?
Looks like it'll work
Yes, that would work - nice workaround.
Allan