[Closed] Multi-line custom invoice field patch

I changed application/modules/invoices/views/view.php to cater for multi-line custom field as we needed this to support a wide variety of custom text to be addable to the invoice, but not in the form of a comment. Would be nice not to have to apply the patch after every update :smile:.

Thanks to row=1, there is no visual change to the original input=text markup.

β€” application/modules/invoices/views/view.php.bak 2015-10-06 15:42:57.345130920 +0200
+++ application/modules/invoices/views/view.php 2015-10-06 15:48:00.969551086 +0200
@@ -473,13 +473,12 @@
<?php endif; ?>
<?php foreach ($custom_fields as $custom_field) { ?>
<?php echo $custom_field->custom_field_label; ?>

  •            <input type="text" class="form-control"
    
  •            <textarea class="form-control" rows=1
                      name="custom[<?php echo $custom_field->custom_field_column; ?>]"
                      id="<?php echo $custom_field->custom_field_column; ?>"
    
  •                   value="<?php echo form_prep($this->mdl_invoices->form_value('custom[' . $custom_field->custom_field_column . ']')); ?>"
                   <?php if ($invoice->is_read_only == 1) {
                       echo 'disabled="disabled"';
    
  •                } ?>>
    
  •                } ?>><?php echo form_prep($this->mdl_invoices->form_value('custom[' . $custom_field->custom_field_column . ']')); ?></textarea>
           <?php } ?>

[size=10]Last Update: 06.10.2015[/size]

I just discovered that my multi-line custom fields patch breaks custom field save :(. Needs a little bit more love I guess.

No need to work on this, it’s already implemented in the development branch.
See IP-46 for more details.