0

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?

0

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")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.