Editor shows field-messages only on first load
Editor shows field-messages only on first load
My editor shows everything (including field-messages) fine when loaded the first time - when invoked a second (and further) times, it still shows everything - but without the field-messages. Who could please give me a hint what to do?
My editor-code starts like
(function($) {
$(document).ready(function() {
var editor = new $.fn.dataTable.Editor({
ajax: 'php/table.ML_03.php',
table: '#AL-04',
fields: [
{
// "label": "F05_Beschreibung ausführlich:",
"label": "Link zur Webseite:",
"name": "f05_beschreibung_ausfhrlich",
"message": "Bitte einen Verweis auf eine Website. Format: http://test.de [05]"
},
[...]
The buttons start with
select: true,
buttons: [
{ extend: 'create', editor: editor, text: 'neuer Eintrag', title: 'Neues Angebot erfassen', formButtons: [
'Speichern', { text: 'Abbrechen', action: function () { this.close(); } }
]},
{ extend: 'edit', editor: editor, text: 'Bearbeiten', title: 'Ausgewähten Eintrag bearbeiten', formButtons: [
'Änderung speichern', { text: 'Abbrechen', action: function () { this.close(); } }
]},
[...]
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
That's odd, there's no reason why that should be the case. Are you able to link to your page, or modify this example, so we can see the issue, please.
Colin
Thanks for providing that example (http://live.datatables.net/wegowafu/150/edit) - I did a little modification on the .js:
Now my issue is reproducable:
Hopefully my description is clear enough...
Thanks for helping!
Thanks for that.
fields.message
is intended for dynamic information, messages that come and go, it's not expected to be permenant (there's a message to that effect on the reference page). If you usefields.fieldInfo
, that'll do what you want - see here.Colin
That's it, thank you! :-)