Unable to scroll on a disabled field

Hello,

Is it possible to make a disabled field scrollable?
The users are only allowed to read the field, but not to write in it. Which is why it is disabled. However, this prevents them from reading the complete text there.
It doesn't matter how many columns I entered in the SP before. Only these 2 are displayed.
For now it looks like this.

Best regards
Corinna

Hello,

Have you tried setting the field to "Read-Only" in the field properties pane on the right hand side of the designer?

Saldy its the same behaviour and we don´t like the look of this.

Perhaps @Nikita_Kurguzov or @mnikitina can support with this problem!

Hello @Sternchen,

You can enable scrolling for disabled fields using the CSS:

.fd-form textarea[disabled]{
  pointer-events: initial;
}
1 Like

That worked. Thank you:)

1 Like

One more quick question.
Is there a way that the field dynamically adjusts to the size?

@Sternchen,

You are welcome!

Do you mean adjust input height to the text? If so, please see this post:

With the code it now looks like this.
image

However, it should adapt dynamically to the length of the field.
Here is the code I tried.

var textArea = fd.field('Name').$refs.textarea;
function recalcHeight() {
textArea.style.height = (textArea.scrollHeight > textArea.clientHeight) ? (textArea.scrollHeight) + "px" : "120px";
}
recalcHeight();
$(textArea).keyup(recalcHeight);

Thank you for your help

@Sternchen,

"120px" in the code is the minimum height of the field. If you want the height of the field to always fit the content, try this code:

var textArea = fd.field('Text').$refs.textarea;
function recalcHeight() {
    textArea.style.height = '10px'
textArea.style.height = (textArea.scrollHeight > textArea.clientHeight) ? (textArea.scrollHeight + 5) + "px" : (textArea.clientHeight + 5) + "px";
}
recalcHeight();

I tried this code and the textarea now looks like this.
image

@Sternchen,

Are you changing the text of this field dynamically? If so, you need to add this code inside the function that changes field value.