Smarty php for if(this... inside a input tag

I have a social sign-in code. When I put them inside my smarty php tpl file it give me some unclose {elseif} or {/if} error.
I would like to know how to put “if(this…” inside smarty php or better solution.

	<div id="loginFm">Sign in using your registered account:<br>
	<input type="text" name="username" {literal}onblur="if(this.value=='')this.value='Username';" onfocus="if(this.value=='Username')this.value='';"{/literal} value="Username" class="loginFm userFm">
	</div>

The error may be from another sequence. Try to have this code as independent, without any other code.
It looks fine to me.
However, that’s why I changed my tags from “{ }” to “[% %]” :slight_smile: