Business Custom Field content not echoing/printing to documents (Invoices)

Hi there,

I’ve been working on a custom theme and have run into an issue where the custom fields set for the business do not echo/print to/become visible in documents with the applied theme. Not sure if it’s a bug or I’m missing something, but I could swear the following line worked a few months ago when I put it in at the time:
<td>{{ business.custom_fields[0].text }}</td>
This no longer works…nothing gets shown.

In trying to figure this out, I found a recent question thread (36877) which seems to indicate they got it working there. However in trying equivalent lines in my theme I don’t get anything echoed out. For example, to try to get my second custom field “Email” I’ve tried all of these lines individually:

<td>{{ custom_fields['Email'] }}</td>
<td>{{ custom_fields['Email'].label }}</td>
<td>{{ custom_fields['Email'].text }}</td>
<td>{{ custom_fields["Email"] }}</td>
<td>{{ custom_fields["Email"].label }}</td>
<td>{{ custom_fields["Email"].text }}</td>
<td>{{ custom_fields[1] }}</td>
<td>{{ custom_fields[1].label }}</td>
<td>{{ custom_fields[1].text }}</td>

For reference here’s my custom field setup:
image

and I do have content entered into each of these on the Settings > Business Details page

I figured “go back to basics” to try to figure out what’s going on, so tried using:
<td>{{ business }}</td>
This gives everything in the business, but the “custom_fields” entry gives this:
[custom_fields, ManagerServer.HttpHandlers.Businesses.Business.View+CustomFields]

Is something not being processed correctly?

Any help is super appreciated!

1 Like

Have you tried looping?

I too had the suspicion that I used to be able to access custom field arrays directly before but not anymore.

I am interested in an answer as well.

ahh, I have, yes, forgot to mention that

here’s what I’ve tried (basically the standard as described around the forums)

{% for field in business.custom_fields %}
  <tr>
    <td>{{ field.label }}:</td>
    <td>{{ field.text }}</td>
  </tr>
{% endfor %}

Did it work or no luck?

nah, no luck with that. I had tried before making the original post, just forgot to mention so when I wrote it.
This is basically where I’m stuck now as I wasn’t able to find (e.g. here on the forum) or figure out any other method of getting the data out.