break characters <br> automatically inserted in results classic grid

jscott

New member
Despite the manual setting of the 'Min width (in px) of the results grid column' variable in the Forms Configurator, some element of business logic word wraps the column content by inserting <br> characters to achieve a column width of 200 px.

The second row of the example below shows 'Comments" column content that is automatically padded with <br> characters:

with breaks in results grid.jpg


I 'eliminated' the break characters using photoshop to illustrate where the breaks are being inserted, and how the content should look:

without breaks in results grid.jpg


I think the functions beginning at Lines 6432 and 8640 may have something to do with this, but I have not been able to figure out what the issue is. Any suggestions would be greatly appreciated!

James

--
DaDaBIK version 8.1-Lerici enterprise, installed on 09-17-2017 (installation code: 11383574a49b956199), the latest version of DaDaBIK is 8.1-Lerici released on 09-05-2017
PHP Version: 5.5.9-1ubuntu4.22
mysql version: 5.5.58-0ubuntu0.14.04.1
Web server: Apache/2.4.7 (Ubuntu)
Client: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36
 

eugenio

Administrator
Staff member
Hello James,
you can adjust the parameter $word_wrap_col in config.php, probably the default value (25) is too low for you.

Best,
 

jscott

New member
Eugenio, a follow-up question. Where is the code that adds the <br> because I would like to add a couple   to indent the next line.

Thanks again,

James
 

eugenio

Administrator
Staff member
Hello,
in /include/business_logic.php
this is the line

$displayed_part = wordwrap($field_value, $word_wrap_col, "\n", $enable_word_wrap_cut);

you should add your   after \n, because then the \n is replaced by a <br> later.

If you need a more granular/clean approach, you could create your own custom formatting function.

Best,
 

DLJonsson

Well-known member
I tried setting $word_wrap_col = '250'; in config.php
but still still see all text fields wrapping after 25 characters in classic grid.

Are there any other steps I should try?


ei5dKbC
 

eugenio

Administrator
Staff member
Hello,
have you also set a value for "Min width (in px) of the results grid column" in form configurator?

Despite $word_wrap_col, the browser can decide to keep the column shorter if you don't set a min width.

Best,
 

DLJonsson

Well-known member
Thanks Eugenio

Setting $word_wrap_col = '250'; in config.php
and then inputting
Min width (in px) of the results grid column : 250

Does the job.

Details are the spice of life.
 
Top