Created
December 11, 2011 04:03
-
-
Save iaindooley/1458219 to your computer and use it in GitHub Desktop.
Subtractive Logic in Template Animation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form> | |
<dl class="error" id="whatevsError"> | |
<dt>You have to do something about this</dt> | |
<dd>The reason we ask you do do this is so that we can laugh all the way to the bank</dd> | |
</dl> | |
<dl> | |
<dt><label for="whatevs">Whatevs:</label</dt> | |
<dd><input type="text" name="whatevs" id="whatevs" /></dd> | |
</dl> | |
</form> | |
To render this using PHP you might do something this: | |
$dom = $this->loadDocument($my_template); | |
if(!checkFormError('whatevs')) | |
$dom->getElementById('whatevsError')->parentNode->removeChild($dom->getElementById('whatevsError')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment