Relationship Graph

Relationship Graph
related to related to child of child of duplicate of duplicate of

View Issue Details

IDProjectCategoryView StatusLast Update
0013319mantisbtbugtrackerpublic2011-09-29 06:29
Reportervincent_sels Assigned Toatrol  
PrioritylowSeveritytrivialReproducibilityN/A
Status closedResolutionduplicate 
Product Version1.2.8 
Summary0013319: Limit the size of custom text fields when they have a maximum length
Description

Text and even number custom input fields always have the same length of 80. When a maximum length is set that is (much) shorter than this, it would be desired that the input field were reduced in size proportionately.

TagsNo tags attached.

Relationships

duplicate of 0004076 new custom_field: maxsize + tabindex 

Activities

vincent_sels

vincent_sels

2011-09-17 14:16

reporter   ~0029772

I have achieved just that by manually altering the following code in \core\cfdefs\cfdef_standard.php:

function cfdef_input_textbox($p_field_def, $t_custom_field_value) {
$t_control_size = 80;
$t_max_length = 255;

if( 0 < $p_field_def['length_max'] ) {
    $t_max_length = $p_field_def['length_max'];
    if ( 80 > $p_field_def['length_max'] ) {
        $t_control_size = $p_field_def['length_max'];
    }
}

echo '<input ', helper_get_tab_index(), ' type="text" name="custom_field_' . $p_field_def['id'] . '" size="' . $t_control_size . '"  maxlength="' . $t_max_length . '"' .
' value="' . string_attribute( $t_custom_field_value ) .'"></input>';

}

atrol

atrol

2011-09-17 14:31

developer   ~0029774

Included in part 1 of duplicate 0004076