diff --git a/templates/CRM/Custom/Form/Field.tpl b/templates/CRM/Custom/Form/Field.tpl
index 205aa146923e6fe953463a658511b232fdc20e91..735b9bc82f72ec75b5d897debeee7f2b83d376e5 100644
--- a/templates/CRM/Custom/Form/Field.tpl
+++ b/templates/CRM/Custom/Form/Field.tpl
@@ -156,10 +156,12 @@ function custom_option_html_type( ) {
     {/if}
             </td>
         </tr>
+       {if $form.in_selector}
        <tr class='crm-custom-field-form-block-in_selector'>
           <td class='label'>{$form.in_selector.label}</td>
           <td class='html-adjust'>{$form.in_selector.html} {help id="id-in_selector"}</td>
        </tr>
+       {/if}
        <tr class="crm-custom-field-form-block-text_length"  id="textLength" {if !( $action eq 1 || $action eq 2 ) && ($form.data_type.value.0.0 != 0)}class="hide-block"{/if}>
             <td class="label">{$form.text_length.label}</td>
             <td class="html-adjust">{$form.text_length.html}</td>