I’ve created a custom php form and added the_field(‘item’); to the value=”” attribute of a hidden input field. Everything works as intended but when I view source within the browser, the form is broken after the value=”” attribute.
Is there a specific way to add the_field(‘item’); to the value=”” attribute without the code breaking? My snippet is below – wondering if anyone else has achieved this?
Thanks for the reply, I think I may have figured it out (not enough coffee). Here are the screenshots showing the break: https://imgur.com/a/fZFdNkl and you can see the code and the view source result.