The CSS content attribute allows me to modify the content of an element. Is it possible to modify an element such that its contents would be posted as part of a form, using pure CSS?
Example of what I want to do:
<style type="text/css">
#sneaky:before {
content: "Testing, testing!";
}
</style>
...
<form action="foo.php" action="POST">
<textarea name="data" id="sneaky"></textarea>
<input type="submit" value="Send" />
</form>
According to several questions on this site, there's no way to use :before and :after on input elements, but one comment did mention that textarea seems to behave specially.
Is there any way to modify form variables (via any element vector) using only CSS?
Note: This doesn't have to be particularly cross-browser compatible, or reliable. I'm researching how different browsers behave and the tricks that each can be subjected to.