further to a previous question, I have this code:
<p class="required">
{err for="msg"}
<!--{{label {t _inquiry_msg}:}}-->
{textarea onblur="if(this.value=='') this.value='Skriv her';" onfocus="if(this.value=='Skriv her') this.value='';"}
{/err}
</p>
And I want the output to be
<textarea onblur="if(this.value=='') this.value='Skriv her';" onfocus="if(this.value=='Skriv her') this.value='';">Write here!</textarea>
I tried {/textarea}
but it didn't work in my template file.
Also, using html <>
tags doesn't work, it breaks the page.
http://euroworker.no/Konftel-300-IP.268
Is it possible to make this in smarty/php?
Thanks :)
Write directly:
<textarea onblur="if(this.value=='') this.value='Skriv her';"
onfocus="if(this.value=='Skriv her') this.value='';">Write here!</textarea>
If it does not work, it has nothing to do with smarty.
Just put:
<textarea onblur="if(this.value=='') this.value='Skriv her';"
onfocus="if(this.value=='Skriv her') this.value='';">Write here!</textarea>
Smarty will not replace anything.
You missed something here:
<!--{{label {t _inquiry_msg}:}}-->
I don't know what this code should do but the error is definitely here
<!--{{label} {t _inquiry_msg}:}}-->
then the HTML should work fine
<textarea onblur="if(this.value=='') this.value='Skriv her';" onfocus="if(this.value=='Skriv her') this.value='';">Write here!</textarea>
Please try the following steps, and keep commenting:-
You really ought to start with the W3C markup validator and than try to find your bug.
Smarty 3 or Smarty 2? Because in version 3 the tag filtering {...}
has been way improved.