← Form tracking demos Watch it fail

6 · Popup form added after load

Nothing here is unusual — a button builds a form and drops it into the page. But the Tag's substitution pass ran at page load, before this form existed, so its hidden field never gets touched.

Open the form, then re-read the inspector above.

What you should see. Before you click, the inspector lists no Click ID field — there is no form yet. After you click, the field appears still holding the literal --CLICK-ID--, even with the Tag running perfectly. Submitting sends that text to the CRM as if it were a real identifier.
The fix: read it from the URL instead. The Tag appends _atid to the page URL, which is available to any form no matter when it is built. Point the field at the URL parameter rather than at the placeholder:
var atid = new URLSearchParams(location.search).get('_atid');
hiddenField.value = atid || '';
If the form builder rejects a leading underscore — several do — rename the parameter: AnyTrack('atclidToUrl', 'click_id'), then map the field to click_id.