Help required in theme codes

As i know after viewing theme codes, all customs fields are called only once by code. its not very good situation,

because better is to call custom fields in separate sections
like

Call customs fields of customer information in customer information block

but in themes all are called on same place, so all custom fields are displayed in same block. is there any possibility to call customs fields section wise?

Yes. You can skip or choose a specific field. If you look back in the forum you will see many discussions about it.

This is by design. It keeps the custom theme more compact and more generic so single custom theme can be applied on any document.

You can delete custom field loop altogether from your theme and directly inject the content of custom fields wherever you like.

For example:

My field: {{ custom_fields["My field"] }}

See? No loop. Just directly injecting specific custom field somewhere.

1 Like

what is variable in myfield? there are no elements in customs fields, all i see is label only, which is not unique, like

i have contact person custom field, both in supplier and customer categories, with label Contact Person
how can i handle it

My field is a name of a custom field. It was just an example, if you have a custom field named My field, that is how you’d inject it in your custom theme.

Thank you Lubos. i understand in used it properly
it will be really usefull if you guide me how to display delivery status in invoice using code like above. (as i already asked in diff thread)