In that topic, we added a post ID as a dynamic parameter to the URL. Now, I would like to add that parameter on a button.
So for example, the URL of a page is xxx.com/?contact_id=1462. Now, I have a contact button on that page, that should point to xxx.com/contact/?contact_id=1462.
So I need to capture the parameter and add that to the button's URL.
If you are able to edit the button markup directly (rather than inserting a button via a block or page builder, for example) then you can output the value from a url parameter using the wpv-search-term shortcode, specifying what the parameter is, e.g.
[wpv-search-term param='contact_id']
You could use that when constructing the href attribute of the button.