Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Fit an entire paragraph in a display field Topic is solved

Questions related to using nuBuilder Forte.
Post Reply
cuadradoja
Posts: 27
Joined: Thu Sep 01, 2022 3:42 am
Has thanked: 1 time

Fit an entire paragraph in a display field

Unread post by cuadradoja »

Hi...

I want to show in a form, the content of a text field (paragraph) from another table using a display type field. The issue is that when I perform a SQL query only the initial part of the paragraph is displayed since the width of the display field is narrow but with a height wide enough for the text to fit vertically to it. I've made several attempts at properties applying CSS to make all the text content fit into the container, but I haven't been able to achieve anything.

I need some help with this please... :roll:
steven
Posts: 369
Joined: Mon Jun 15, 2009 10:03 am
Has thanked: 52 times
Been thanked: 52 times

Re: Fit an entire paragraph in a display field

Unread post by steven »

Hi cuadradoja,

Are you wanting the text to wrap inside your display object?


Steven
A short post is a good post.
cuadradoja
Posts: 27
Joined: Thu Sep 01, 2022 3:42 am
Has thanked: 1 time

Re: Fit an entire paragraph in a display field

Unread post by cuadradoja »

Hi Steven,

That's right, I really don't know how to do it...
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: Fit an entire paragraph in a display field

Unread post by kev1n »

A display field (which is a HTML input type element) is meant for single-line text. Since you're working with paragraphs, consider assigning the text to textarea or div.
steven
Posts: 369
Joined: Mon Jun 15, 2009 10:03 am
Has thanked: 52 times
Been thanked: 52 times

Re: Fit an entire paragraph in a display field

Unread post by steven »

Hi cuadradoja,

As Kev mentioned HTML input elements don't format the way a textarea does.

Here is a bit of a Hack...

Put this on the onclick of this button

Code: Select all

$('#jok_from_display').val($('#jok_display').val());
It doesn't reformat it the same but at least you see everything.

(or download tha attached db)

d2.png

display_textarea.zip


Steven
You do not have the required permissions to view the files attached to this post.
A short post is a good post.
cuadradoja
Posts: 27
Joined: Thu Sep 01, 2022 3:42 am
Has thanked: 1 time

Re: Fit an entire paragraph in a display field

Unread post by cuadradoja »

My friend... you're the best!!!

It works perfectly for what I'm trying to do.

Thank you very much for your valuable advice :thumb:
Post Reply