Answers.Body: <p>Not  the exact answer, just a workaround one may find useful: field label stays unchanged even if field name changes, which makes possible element catch by label, e.g.:   </p>
  
  <pre><code> AND ($element.label eq "Element label")
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-09T20:37:03.217Z
Answers.LastActivityDate: 2016-08-09T20:37:03.217Z
Answers.UserDisplayName: yurg
Body: <p>We've tried to alter some custom fields display (namely, make some fields display data only, not editable text field). It seems that all custom fields logic is inside <strong>templates\CRM\Custom\Form\CustomField.tpl file</strong>
  So, we've tried to do something like this  </p>
  
  <pre><code>{if $element.data_type neq 'Date' AND $element.element_name eq "custom_358_437"}
  {$element.element_value}
  </code></pre>
  
  <p>where <strong>custom_358_437</strong> is a field name picked via form html code inspector. 
  All seems fine till another logged in user looks at the same form; it turns that the field gets "random" another name  (say, <strong>custom_15_415</strong> for other user and <strong>custom_47_412</strong> for yet another user), which seems to be pretty odd. </p>
  
  <p>Not sure if it's "by design" (yet not sure why same field name should be changed for each user); if it is so, is there any logic in field name generation (may be current user ID is being used, although it doesn't look like this)? In a broader sense, how do we target custom field for making changes, if not by field name?</p>
  
Tags: <developer><smarty>
Title: Same custom field name at Contact Form seems to be different for each logged in user
ThreadText: # Same custom field name at Contact Form seems to be different for each logged in user
  
  (Asked by: username_0 on 2016-08-08)
  
  We've tried to alter some custom fields display (namely, make some fields display data only, not editable text field). It seems that all custom fields logic is inside **templates\CRM\Custom\Form\CustomField.tpl file**
  So, we've tried to do something like this
  
  ```
  {if $element.data_type neq 'Date' AND $element.element_name eq "custom_358_437"}
  {$element.element_value}
  
  ```
  
  where **custom\_358\_437** is a field name picked via form html code inspector.
  All seems fine till another logged in user looks at the same form; it turns that the field gets "random" another name (say, **custom\_15\_415** for other user and **custom\_47\_412** for yet another user), which seems to be pretty odd.
  
  Not sure if it's "by design" (yet not sure why same field name should be changed for each user); if it is so, is there any logic in field name generation (may be current user ID is being used, although it doesn't look like this)? In a broader sense, how do we target custom field for making changes, if not by field name?
  
  **Tags:** developer, smarty
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2016-08-09. Score: 0 | Accepted answer
  
  Not the exact answer, just a workaround one may find useful: field label stays unchanged even if field name changes, which makes possible element catch by label, e.g.:
  
  ```
   AND ($element.label eq "Element label")
  
  ```
  
  
  ---
  
  