It's a timing issue.
When would you calculate the hash on the original HTML? If the user obtains the HTML from the site and puts it into the form... and then modifies the HTML... and then passes it to your PHP script, when would you "see" the original HTML to calculate the hash?
It could easily work IF the owner of the original web site (the source of the HTML) would put a hash value in the HTML. Then when you get the HTML, you could calculate the hash and see if it matches the hash that the original author put on it. That is a way to make sure a message doesn't get modified by a middleman in transit. But I get the sense from your post that the original author of the HTML doesn't even know that you are scraping the HTML.
Since you can't get the original author of the HTML to put a hash on it... you don't even SEE the HTML until after the middleman had the opportunity to modify it. So what would you be checking? You could check to see if the middleman modified his modified HTML?!?! That doesn't help 🙂
So this isn't a limitation on the capabilities of PHP or HTML. It's a limitation imposed by your system. Since the middleman is reporting the HTML to you and you have no way of seeing the original HTML to verify, you just have to trust what the middleman is passing on.