question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Read Only" parameter not working for Child Table fields in Dialog

See original GitHub issue

Description of the issue

The parameter “read_only” is not working for fields in the child table on a Dialog.

Context information (for bug reports)

Output of bench version

erpnext 13.34.2
frappe 13.34.0

Steps to reproduce the issue

  1. Create a new dialog
  2. Add a table in the dialog. In one of the fields in the table pass a “read_only: 1” parameter.
  3. Trigger the dialog and check the field. It is not read only as expected.

Observed result

sample editable

Read Only Field

There is also an existing post in the discuss forum for this. See here https://discuss.erpnext.com/t/set-read-only-on-field-table-on-dialog-not-set/83721

Expected result

Item Code field should be read only.

Stacktrace / full error message

No Stacktrace. I can confirm also in the console that the df of the field is read_only:1

console

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:2
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Tom-Finkecommented, Nov 8, 2022

Thank you for your work, this bug has been really annoying… My fields are now read only, but the “edit” icon next to each row is still showing. Any Idea how I’d hide that without having to delete the element with JQuery?

1reaction
creamdorycommented, Sep 13, 2022

Hi All! thank you for all your inputs. @gn306029 I tried your quick fix and it was working for me. It is also the easiest fix. But then again, this is still a core issue. Thanks @phot0n for assigning to yourself and taking a look more.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Set read_only on field table on dialog Not set! - ERPNext Forum
Set read_only on field table on dialog Not set! ... see "Read Only" parameter not working for Child Table fields in Dialog ·...
Read more >
how to make fields read only in child task table f... - ServiceNow
Hi everyone, I am trying to make the fields read only in task form (child table) whenever a field (ex: HR service) in...
Read more >
HTML attribute: readonly - HTML: HyperText Markup Language
The Boolean readonly attribute, when present, makes the element not mutable, meaning the user can not edit the control.
Read more >
Enabling custom actions with a dialog for additional input fields
Create a data model with Header (Parent), Item (Child), Conditions (Grand Child) having fields “Valid from”, “Valid to “. Create an abstract CDS ......
Read more >
Database Engine events and errors - SQL Server
119, 15, No, Must pass parameter number %d and subsequent ... 280, 16, No, Only base table columns are allowed in the TEXTPTR...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found