Replies: 0
Hi all,
I am trying to automatically fill in an input field through PHP in contact form 7, but unfortunately that is not working.
I am using the following code:
<?php
$target = $xpath->query("//div[@class="stock-num heading-font"]");
echo '<td><input type="text" id="your-stockid" value="'. $target .'"></td>';
?>
In the top left corner of the page is a stock-id. I want that stock-id automatically to be printed in the input field. I have searched for several ways to achieve this, but none of the solutions has fixed this issue so far… I also tried to achieve this through javascript, but I was unable to get it working.
Does anyone of you can tell me how to achieve this?
Thanks in advance!! 🙂