I am working on a project in which I have a field that is calculated from another field, but this field has the readonly() method provided by Nova because it should not be modified by the user but it is necessary that the user can see it and that it is also saved to my database.
But the problem I have is that the readOnly() method adds the disabled attribute to the input and therefore its value is not recorded in my database when I submit my form. Which seems wrong to me as disabled is not the same as readOnly in html.
I also tried using the withMeta() method like this:
->withMeta([
'extraAttributes' => [
'readonly' =>true,
'disabled' =>false,
],
]),
But I was unsuccessful because the disabled attribute keeps getting added to my input.
I was wondering if there is a way for my input to only have the readonly attribute and not have the disabled attribute?
I guess it's important to also mention that I'm not an expert in Javascript or VUE.