Data Bind Variables & Custom Fields

Is there a list of data bind variables that can be used on the HTML templates? Also, is it possible to expose the custom fields to the custom templates?

Custom fields are not yet exposed as variables, I’m working on it.

In the latest version, variables which are injected into the invoice are displayed right under themed invoice.

Also check Guides | Manager

2 Likes

Do you know roughly what release it might be in?

Yes, it should be implemented by end of this week.

Are custom fields exposed as variables yet?

Yes. Check the latest version (14.8.11). Custom fields on sales invoice level and customer level are now exposed.

Some examples

Let’s say you have custom field on your invoice named Ordered by, then HTML code in your HTML theme can be:

<span data-bind="text: CustomFields['Ordered by']"></span>

Or let’s say you have custom field on your custom named Membership ID, then HTML code in your HTML theme can be:

<span data-bind="text: CustomerCustomFields['Membership ID']"></span>

Is it possible to have custom field on delivery notes? In my part of the world, it is known as Delivery Order. and Order Number as Purchase Order Number.

What country is it for? Perhaps it should be handle through translations?

we are using it in Singapore. Is it possible to make the title Editable? (for Delivery Notes)

If custom fields for Order Number can be edited to PO Number/Purchase Order Number for us will be really helpful.

Is there now a list of data bind variables that can be used on the HTML templates? I have tried to using variations of this

<span data-bind="text: CustomFields['Footer']"></span>

or

<span data-bind="text: SalesInvoiceName['Footer']"></span>

or InvoiceName or Invoice etc etc, but I cannot find the variable for the Sales Invoice custom field

I am not getting anything showing up on the invoice.

This code works

{{ custom_fields['Footer'] }}

but the problem is that it displays all the content on one line! Another problem I am seeing with custom fields is that I can’t have some text in bold.

What is the custom field on your invoice? What is it named? Footer?

Yes I named it Footer as its for text I want to be in the Footer area. It shows up on the sales invoice when I use the custom_fields coding, but not with the other one. I may have to ask someone who does HTML programming how to do this. Thanks

custom_fields is correct, that is what i have on my custom template.