Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing support for "Readonly plain text" #121

Open
it-management opened this issue Aug 3, 2022 · 1 comment
Open

Missing support for "Readonly plain text" #121

it-management opened this issue Aug 3, 2022 · 1 comment

Comments

@it-management
Copy link

There is a missing support for Readonly plain text.
It's possible to put a class form-control-plaintext to the Field manually, but class form-control (or form-select for <select>) persists, which is wrong.

@kosdmit
Copy link
Contributor

kosdmit commented Jul 4, 2024

I use UneditableField to to avoid unwanted behaviour of 'form-control' class in this case. This Field works well in bundle with 'form-control-plaintext' css_class. For example:

UneditableField('name', css_class='form-control-plaintext', rows=2)

This will produce the following html:

<input type="text" name="name" value="Тестовая компания" maxlength="200" class="uneditable-input form-control-plaintext textinput" rows="2" disabled="disabled" required="" id="id_name">

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants