Ways to render customfield on customer-portal

I created a custom field, extending GenericTextCFType, and I used Velocity templates to change it’s behavior on the view and edit screens.
So far it works, but when I add this field to a Request-type (JSM), to show it in the customer portal, it is only rendered as plain text field (single line). The Velocity template seems not to apply here.

Does anyone know, on how to render a field on the customer portal?

Any help is appreciated, many thanks in advance.

I created the field based on this tutorial:
https://developer.atlassian.com/server/jira/platform/creating-a-custom-field-type/

I checked this documentation, if I can add a resource of type velocity for the portal, analogue to the normal edit and view screens, but it didn’t help me.
https://developer.atlassian.com/server/jira/platform/custom-field/

This is my module declaration in the plugin xml file:

<customfield-type name="Product-Count-Field" i18n-name-key="product-count.name" key="product-count"
                  class="com.toolbox.customfields.ProductCount">
    <description key="product-count.description">The Product Count Customfield</description>
    <resource name="view" type="velocity" location="/templates/product-count-customfield/view.vm"/>
    <resource name="edit" type="velocity" location="/templates/product-count-customfield/edit.vm"/>
</customfield-type>

This is a simplified example of velocity code it tested:

#if ($value)
Custom test text and field-value: $value
#end
2 Likes