0

I'm using a dynamic form with Angular 9 and i'd like to select text on disabled fields but i'm not able to. I use this form for both the edition and the readonly usage.

Here is an exemple of one of the inputs on my form

<input class="form-control" type="text" id="title" formControlName="title"> 

Do you now how i could allow a text selection on my form controls without enabling the edition on the field?

If you need more details about my code, feel free to ask.

Timothée
  • 7
  • 1
  • 7
  • 2
    Instead of disabling it, you could use the ```readonly``` attribute on the input and that will allow you to select the text https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly – nll_ptr Jun 17 '20 at 13:05
  • @nullptr.t Thanks for your answer ! I'm going to test it asap – Timothée Jun 17 '20 at 13:55

0 Answers0