Custom HTML fields actually have a special substitution to cover the layout cases. $reason determines location, which can be list, register, edit, profile, and search. You can substitute it in with [reason]. You can also use IF substitutions to condition content to show at a specific location. Example as follows.
[cb:if reason="edit"]Display on profile edit only.[/cb:if]
I've added a feature ticket to clarify usage of [reason] for Custom HTML fields description as it isn't mentioned anywhere.
forge.joomlapolis.com/issues/7092