Quantcast
Channel: Editor — DataTables forums
Viewing all articles
Browse latest Browse all 3800

Noob: Change field attr

$
0
0

Error messages shown:
None.
Description of problem:
I have an embarrassing newbie question.
How does one remove attributes on an Editor field.
I have a field defined as

{label: 'Company Code:', name: 'id', type: 'readonly', attr: {disabled: true, required: true}},

Editor, being a very efficient and faithful servant is not letting me touch that field when addin data.
So I thought I'd add an event handler...

   editor.on('initCreate', function (e, json, data) {
    editor.field('id') // <=== I don't know what to put here to remove type: 'readonly', attr: {disabled: true, required: true}
   });

Your feedback is appreciated.


Viewing all articles
Browse latest Browse all 3800

Trending Articles