Page 1 of 1

Size of a custom field

Posted: 24 Jun 2024, 09:21
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

Re: Size of a custom field

Posted: 24 Jun 2024, 12:14
by cas
afaik there is no option to set a default length. You can position the listbox by typing something on the keyboard :mrgreen:

Re: Size of a custom field

Posted: 24 Jun 2024, 18:32
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.

Re: Size of a custom field

Posted: 01 Jul 2024, 09:53
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

Re: Size of a custom field

Posted: 08 Jul 2024, 07:59
by cas
Did you use List as the type of the custom field?