Skip to main content

Custom Fields

Custom fields allow you to extend LoveInvoice's invoice functionality to match your specific business needs. They're versatile data fields that you can create and use across all your invoices.

What Are Custom Fields?

Custom fields are additional data fields that you define for your business. They appear on every invoice you create, allowing you to capture information that's specific to your workflow or industry.

Common Use Cases

  • Purchase Order Numbers: Track client PO numbers for each invoice
  • Project References: Link invoices to specific projects or jobs
  • Department Codes: Organise invoices by department or cost centre
  • Contract References: Reference specific contracts or agreements
  • Job Numbers: Track work by job or task number
  • Client References: Use your client's internal reference numbers
  • Delivery Notes: Reference delivery note numbers
  • Approval Codes: Track approval or authorisation codes

Creating Custom Fields

To create a custom field:

  1. Go to SettingsInvoice Custom Fields
  2. Click Create New Field
  3. Fill in the field details:
    • Field Label: The name that appears on invoices (e.g., "Purchase Order Number")
    • Field Type: The type of data this field will hold
    • Required: Whether this field must be filled before finalising an invoice
  4. For select fields, add the available options
  5. Click Create Field

The field will now appear on all your invoices.

Field Types

LoveInvoice supports several field types to accommodate different kinds of data:

Text

A simple text input for short pieces of information

Example: Purchase Order Number, Job Code, Reference ID

Textarea

A larger text area for longer pieces of information

Example: Project description, work summary, special instructions

Select

A dropdown menu with predefined options that you define

Example: Department, Project Type, Billing Cycle

Number

A numeric field for numbers only

Example: Quantity of items, batch number, revision number

Date/Time

A date and time picker for selecting specific dates

Example: Project start date, delivery date, contract date

Boolean

A simple yes/no toggle

Example: Urgent, Approved, Requires Signature

Currency

A field for monetary values with currency formatting

Example: Deposit amount, discount amount, additional fees

Setting Up Select Field Options

For select fields, you'll need to define the available options:

  1. Choose "Select" as the field type
  2. Add each option on a new line in the options editor
  3. Options can be reordered by dragging to change their display order

Using Custom Fields in Invoices

Once you've created custom fields, they automatically appear in the invoice editor:

  1. Open or create an invoice
  2. Look for the Custom Fields section in the editor
  3. Fill in each field as needed
  4. Required fields must be completed before you can finalise the invoice

Required Fields

If you mark a custom field as required, you won't be able to finalise an invoice until that field is filled. This is useful for critical information you always need to capture.

Managing Custom Fields

Editing Fields

To modify an existing custom field:

  1. Go to SettingsInvoice Custom Fields
  2. Click the Edit button next to the field
  3. Make your changes
  4. Click Update
note

Type Modification Caution

Changing a field's type may affect existing invoice data. Be cautious when modifying field types.

Deleting Fields

To remove a custom field:

  1. Go to SettingsInvoice Custom Fields
  2. Click the Delete button next to the field
  3. Confirm the deletion
warning

Field Deletion Impact

Deleting a field removes it from all invoices. Existing data in that field will be lost. Consider whether you need to retain the data before deleting.

Reordering Fields

The order of custom fields in the settings determines the order they appear on invoices. Drag and drop fields to rearrange them into your preferred order.

Custom Fields in Invoice Templates

Custom fields can be used in invoice templates to display the information you've captured. This allows you to include custom field data directly on the PDF invoice that clients receive.

Using Custom Fields in Liquid Templates

Custom fields are available as template variables in both email and invoice PDF templates. They are provided as an array, so you can iterate through them to display all custom fields that have values.

Email Templates

In email templates (MJML format), you can use Liquid syntax to display custom fields:

{% for custom_field in custom_fields %}
<mj-text>{{ custom_field.field_label }}: {{ custom_field.value }}</mj-text>
{% endfor %}

Invoice PDF Templates

In invoice PDF templates (Liquid format), you can use the same approach:

{% for custom_field in custom_fields %}
<div style='margin-bottom: 40px;'>
<strong>{{ custom_field.field_label }}:</strong> {{ custom_field.value }}
</div>
{% endfor %}

Where to Add Custom Fields

You can add custom fields to your templates in the following locations:

Email Templates:

  • Go to SettingsEmail Templates
  • Edit either the New Invoice or Payment Confirmation template
  • Add the custom fields block where you want the fields to appear (typically in the body section after invoice details)

Invoice PDF Templates:

  • Go to SettingsInvoice Design
  • Edit your custom invoice template
  • Add the custom fields block where you want the fields to appear (commonly after the billing information or before the line items table)

Available Variables

The custom fields template variables are:

Other

{{custom_fields}}
Array of custom field objects with field_label and value propertiesRequires looping with {% for %}
array

Example Usage

Here's a complete example of how you might add custom fields to an invoice template:

{% for custom_field in custom_fields %}
<div style='margin-bottom: 40px;'>
<strong>{{ custom_field.field_label }}:</strong> {{ custom_field.value }}
</div>
{% endfor %}

This will display each custom field as a separate labeled item, formatted as:

```
Purchase Order Number: PO-2025-001
Project Reference: WEB-DESIGN-001
```

Each custom field appears as native invoice metadata, similar to how invoice number, due date, and issue date are displayed.

## Best Practices

### Plan Your Fields

Before creating custom fields, think about what information you actually need:

- Start with essential fields only
- Avoid creating fields you won't use
- Consider whether information could be captured elsewhere (e.g., in client details)

### Use Clear Labels

Choose field labels that are:

- **Descriptive**: Make it clear what the field is for
- **Concise**: Keep labels short enough to fit on invoices
- **Consistent**: Use a naming convention across your fields

**Good examples**: "Purchase Order Number", "Project Reference", "Department Code"
**Poor examples**: "PO#", "Ref", "Dept"

### Choose the Right Type

Select the field type that best matches your data:

- Use **Select** for fields with a limited set of options
- Use **Text** for short, free-form input
- Use **Textarea** for longer descriptions
- Use **Date/Time** for dates (not text fields with dates)
- Use **Number** for numeric data (not text fields with numbers)

### Use Required Fields Sparingly

Only mark fields as required if they're truly essential:

- Too many required fields can slow down invoice creation
- Consider whether a field is always needed or just sometimes
- Optional fields can be left blank when not applicable

### Keep Fields Organised

- Group related fields together by reordering
- Use consistent naming conventions
- Review and remove unused fields periodically

### Document Your Fields

If your team uses custom fields, create internal documentation explaining:

- What each field is for
- When to fill in each field
- What values to use (especially for select fields)
- Any business rules around field usage

## Common Custom Field Setups

### Freelancer Setup

- **Project Reference**: Link invoice to specific projects
- **Contract Reference**: Reference client contracts
- **Hours Worked**: Track total hours (if not in line items)

### Agency Setup

- **Purchase Order Number**: Client PO for the work
- **Project Code**: Internal project identifier
- **Department**: Which department did the work
- **Account Manager**: Who manages this client

### Consultant Setup

- **Engagement Reference**: Reference the engagement agreement
- **Deliverable**: What this invoice covers
- **Billing Period**: The time period covered

### Retail/Service Setup

- **Order Number**: Link to customer orders
- **Delivery Note**: Reference delivery documentation
- **Sales Representative**: Who made the sale

## Troubleshooting

### Field Not Appearing

If a custom field doesn't appear on invoices:

- Check that the field is enabled (not deleted)
- Ensure you're looking in the correct section of the invoice editor
- Try refreshing the page

### Can't Finalise Invoice

If you can't finalise an invoice:

- Check that all required custom fields are filled
- Look for validation error messages
- Ensure each required field has a valid value

### Data Lost After Field Change

If data disappears after changing a field type:

- This is expected when changing incompatible field types
- Consider creating a new field instead of changing the type
- Export your invoice data before making significant field changes

## Advanced Tips

### Use Select Fields for Consistency

Select fields ensure consistent data entry, which makes:

- Filtering and searching invoices easier
- Reporting more accurate
- Data analysis more reliable

### Combine Fields for Complex Data

For complex information, consider using multiple related fields:

- **Project Phase** (select) + **Phase Description** (textarea)
- **Department** (select) + **Cost Centre** (text)

### Review Usage Regularly

Periodically review your custom fields:

- Which fields are actually being used?
- Are there fields you never fill in?
- Could some fields be combined or simplified?

### Test Before Rolling Out

If you're adding custom fields for your team:

- Test with a small group first
- Gather feedback on field usefulness
- Adjust based on actual usage patterns