readonly field in "Create new entry" form
readonly field in "Create new entry" form
rshun
Posts: 44Questions: 9Answers: 0
How can I create readonly fields for First Name and Last Name in "Create new entry" form?
This discussion has been closed.
Replies
Read the docs.
https://editor.datatables.net/reference/field/readonly
I try
editor.disable(['RecordDate']);
and
label: "Record Date:",
name: "RecordDate",
type: 'readonly',
other fields (Datetime field and checkbox field) not working properly.
I follow this example https://editor.datatables.net/examples/api/checkbox.html
to create checkbox field.
It is working if readonly field not in the form.
When readonly field in the form, I try to edit checkbox field. I will not send edit to server.
I'm not clear what the issue is, but here's an example with that read-only field.
field().disable()
is another option too - see theposition
field.If that doesn't help, please can you update the example to demonstrate your issue,
Colin
I added MV field. This is boolean.
http://live.datatables.net/foqivami/4/watch
If you try to change checkbox in the table.
edit will not send to server.
Your code looks the same as this example, so it should be working fine. Are you able to link to your page so we can take a look?
Colin
I have a workaround solution
Since my Record Date always today,
That can avoid ajax to post back the value of RecordDate causing problem.
(mguinness says in the comment of https://editor.datatables.net/reference/field/readonly)
Excellent, glad all working,
Colin