Gustavo Previatto Gustavo Previatto - 1 month ago 9
HTML Question

Webpy: Variables not showing properly in html

I'm getting an error while using webpy, my string is "No client", but when opening html in browser i get only 'No', the white space and rest of string is lost! What I'm doing wrong?

This is what is in the .html part:



<input type="text" placeholder= $:name2 value= $:name2 name="name3" id="nome3" readonly>





I tried $:name2 and $name2, maybe because of some string format.

Answer

I think you just need to put quotes around the values. Your example should become:

<input type="text" placeholder="$:nome2" value="$:nome2" name="nome3" id="nome3" readonly>
Comments