Steps to reproduce the issue
- Create a form that contains a
switcher. In order to simplify testing, I temporarily changed the core form /administrator/components/com_content/config.xml.
- I changed this code beginning on line 19
<field
name="show_title"
type="radio"
label="JGLOBAL_SHOW_TITLE_LABEL"
class="switcher"
default="1"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
to
<field
name="show_title"
type="radio"
label="JGLOBAL_SHOW_TITLE_LABEL"
class="switcher"
default="1"
readonly="true"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
in the form /administrator/components/com_content/config.xml. I added readonly="true"
And i tried this code.
<field
name="show_title"
type="radio"
label="JGLOBAL_SHOW_TITLE_LABEL"
class="switcher readonly"
default="1"
readonly="true"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
in the form /administrator/components/com_content/config.xml. I addes the class readonly.
Expected result
I cannot change the value of the field. It is displayed as a readonly displayed field.
Actual result
Nothing changes. The field can be edited as normal. The display is also such that you have the impression that the field is active.

System information (as much as possible)
Additional comments
If I delete the class switcher, the radio input works as expected. It is now readonly. But the style is not nive :)
<field
name="show_title"
type="radio"
label="JGLOBAL_SHOW_TITLE_LABEL"
class=""
default="1"
readonly="true"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>

Steps to reproduce the issue
switcher. In order to simplify testing, I temporarily changed the core form/administrator/components/com_content/config.xml.to
in the form
/administrator/components/com_content/config.xml. I addedreadonly="true"And i tried this code.
in the form
/administrator/components/com_content/config.xml. I addes the classreadonly.Expected result
I cannot change the value of the field. It is displayed as a
readonlydisplayedfield.Actual result
Nothing changes. The field can be edited as normal. The display is also such that you have the impression that the field is active.

System information (as much as possible)
Additional comments
If I delete the class switcher, the radio input works as expected. It is now readonly. But the style is not nive :)