How in PHP to set the value of HTML element by id or class?
Doing a little project in Wordpress using Gantry 5.
I want to display values sent by the form at a certain place on the page.
In the particles of the Gantry directly it can be done. But you can write something in php in a separate template for my page.
The question is - how can I set a value to the element by id or class?
Using JS to understand and knowledge of php is not enough.
Very not very clear what You need. Apparently some manipulations with the DOM, but then the question is, why php? And if so, then at least the example code.
If the question is how to display some data from the submitted form, like this: echo $_POST['someMyData'];
and paste it in "a certain place"