Question

Each share task form has fields. Some of them use icon to provide help text. For example, bpm:workflowPriority, get it. I need to remove this one. I found, that сode below generates icons, but i cant understand, where the field.help process is runned. How i can hide icons for fields?

<#macro renderFieldHelp field>
   <#if field.help?? && field.help?length &gt; 0>
     <span class="help-icon">
        <img id="${fieldHtmlId}-help-icon" src="${url.context}/res/components/form/images/help.png" title="${msg("form.field.help")}" tabindex="0"/>
     </span>
     <div class="help-text" id="${fieldHtmlId}-help"><#if field.helpEncodeHtml>${field.help?html}<#else>${stringUtils.stripUnsafeHTML(field.help)}</#if></div>
   </#if>
</#macro>
Was it helpful?

Solution

Help icon shows-up by-default when you have a constrain on your field. For example priority is defined as

 <!--  Priority for the workflow as a whole -->
      <property name="bpm:workflowPriority">
          <type>d:int</type>
          <default>2</default>
          <constraints>
              <constraint ref="bpm:allowedPriority" />
          </constraints>
      </property>



    <constraint name="bpm:allowedPriority" type="LIST">
        <parameter name="allowedValues">
            <list>
                <value>1</value>
                <value>2</value>
                <value>3</value>
            </list>
        </parameter>
    </constraint>

I think help icon is a good idea if you have some constrain on your filed and want your user to select correct values.

You have following options:

  1. If you don't need constraints , remove it from your model. You can override bpm:xxxxxx constraints by extending base model
  2. You can look at BPMEngine code and change the template which generate help icon
  3. Help icon is generated with class "help-icon" like :

    span class="help-icon"

SO you can override form.css and hide this span. Something like this will work:

.form-container .help-icon {
         visibility: hidden;
}

But this will remove all help icons from all the share forms, unless you change form divs and add some intelligence in your css selector.

Hope this helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top