I want to populate an input field with a parameter from the URL. The parameter isn't set on page load. It's set by jQuery after clicking a link on the site.
The jQuery code:
$('[data-target]').click(function() {
window.history.pushState(
null,
null,
'?data-target=' + $(this).data('target').replace('#', '')
);
});
(from here https://stackoverflow.com/a/54540461/1788961)
Is there any way to use parameter with GET after the URL has changed?
For reference: I try to populate an input field from Contact Form 7 (WordPress plugin) and I'm using the "Contact Form 7 Dynamic Text Extension" for that (https://de.wordpress.org/plugins/contact-form-7-dynamic-text-extension/).
The data I want to use comes from Advanced Custom Fields and is stored in a sub field. Therefore I can't use a meta field from the post itself. (I think).