Quick-Fix add/extend textarea or any other custom field type

Just to share if somebody need to extend custom field types (textarea example)

Add this code near line 160 in application/helpers/custom_values_helper.php

<?php break; case 'TEXTAREA': ?>
<textarea id="<?php echo $custom_field->custom_field_id; ?>" name="custom[<?php echo $custom_field->custom_field_id; ?>]" class="form-control" value="<?php echo $fieldValue; ?>">
    <?php echo $fieldValue; ?>
</textarea>

And replace/add ‘TEXTAREA’, to code near line 34
‘TEXT’,
‘TEXTAREA’,
‘DATE’,
‘BOOLEAN’

You can add whatever field type and make customization per your needs…

1 Like

A post was split to a new topic: Set 4 decimal places for amounts

i tried it but it didnt add any field in invoice what should i do