Page 1 of 1

Lookupfield unreadeable (too narrow)

Posted: 2018-12-25 21:24
by hubert
Hi,

On a detail view for adding record.
Detail view in two colums
One field on column 2 is a lookup = "country", shows records but ...
The select box is too short, only one character, then the eye and a plus sign.
I do not want neither detail (eyes) neither adding directly in the "country" table (plus sign).
I just want the select to be large enough to see the countries proposed (15 chars).
Checked many choices in tables defs, no improvement ... only the eye smashed but no more readeable chars
Probably a js could save me but sure there's something in tables defs that is wrong ...

Ideas ?

Merry XMas !

Re: Lookupfield unreadeable (too narrow)

Posted: 2018-12-27 23:52
by bescott53
Hubert, i think this might be a bug but not sure, maybe Ahmad can clarify.

If you go to the templates folder and then the DV file, look for the fieldname and add this width: 100%

Re: Lookupfield unreadeable (too narrow)

Posted: 2018-12-29 11:51
by pbottcher
Hi,

as you use "Detail view in two colums",

can you post what you used to create the two columns?

Re: Lookupfield unreadeable (too narrow)

Posted: 2018-12-30 18:28
by hubert
Hi,

As Ahmad learns on videos :

function ecoles_dv($selectedID, $memberInfo, &$html, &$args){

if (isset($_REQUEST['dvprint_x'])) return;

ob_start(); ?>

<script>
$j(function(){
$j('fieldset.form-horizontal').removeClass('form-horizontal').addClass('form-inline');

})
</script>

<style>
@media (min-width: 768px){
.form-inline .form-group{
width: 48%;
margin-bottom :0.75em;
vertical-align: top;
}
}
</style>

<?php
$new_layout = ob_get_contents();
ob_end_clean();

$html .= $new_layout;
}

Same code is ok in an other app.
Seems here the select cannot enlarge but no js error shown ...

Thx for helping

Re: Lookupfield unreadeable (too narrow)

Posted: 2018-12-31 09:58
by pbottcher
Hi,

can you try

@media (min-width: 768px){
.form-inline .form-control {
width: 100% !important;
}
.form-inline .form-control-static {
width: 100% !important;
}

.form-inline .form-group{
width: 49%;
margin-bottom: 0.75em;
vertical-align: top;
}
}

Re: Lookupfield unreadeable (too narrow)

Posted: 2018-12-31 16:16
by hubert
Pböttcher you're magician !
All is now OK !
How could Ahmad pass through this option ?

Thanks lot indeed, you're my XMas father of the day !