Size of a custom field

General discussion of Mantis.

Moderators: Developer, Contributor

Post Reply
Joselyne
Posts: 70
Joined: 14 Dec 2023, 15:59

Size of a custom field

Post by Joselyne »

Hello,

I have a custom field that contains as default values users from AD. The problem is that the field shows only 10 lines a time, we have to scroll many times in order to show the rest of the lines.
Is there an option so that i cane enlarge the size (to show more than 10 lines at a time).

Thanks
cas
Posts: 1768
Joined: 11 Mar 2006, 16:08
Contact:

Re: Size of a custom field

Post by cas »

afaik there is no option to set a default length. You can position the listbox by typing something on the keyboard :mrgreen:
atrol
Site Admin
Posts: 8555
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Size of a custom field

Post by atrol »

cas wrote: 24 Jun 2024, 12:14 afaik there is no option to set a default length. You can position the listbox by typing something on the keyboard :mrgreen:
The number of rows is hardcoded in function cfdef_input_textarea, but you can override the function by changing #function_print_input in $g_custom_field_type_definition[CUSTOM_FIELD_TYPE_TEXTAREA], see core/cfdefs/cfdef_standard.php for more details.
Never tried myself, but should work.
Please use Search before posting and read the Manual
Joselyne
Posts: 70
Joined: 14 Dec 2023, 15:59

Re: Size of a custom field

Post by Joselyne »

Thank you Atrol.

What would be the title of the fucntion ?
1) I tried this:

function custom fucntion custom_function_override_cfdef_input_list(parameters) since the custom field is of the type enum, in custom_functions.php
( i change the value from 5 to 10)

2) I define :
$g_custom_field_type_definition in custom_strings_inc.php and change '#function_print_input' => 'custom_function_override_cfdef_input_list', but that does not work.

Maybe I have done something wrong.

I need halp please.

Thank you
cas
Posts: 1768
Joined: 11 Mar 2006, 16:08
Contact:

Re: Size of a custom field

Post by cas »

Did you use List as the type of the custom field?
Post Reply