<%
set form = aspl.form

if form.postback then	

	set field = form.field("plain")
	field.add "html", "<div id=""qrSpinner""></div><img style=""width:100%"" id=""qrImg"" alt="""" src="""" />"

	set field = form.field("plain")
	field.add "html",replace(aspl.loadText("default/html/sampleform35.resx"),"[QR]",aspl.sanitizeJS(aspl.getRequest("qr")),1,-1,1)
	
else

	set field = form.field("plain")
	field.add "html", "<img style=""width:100%"" alt="""" src=""https://chart.googleapis.com/chart?cht=qr&chs=320x320&chl=asplite.com"" />"

end if

set field = form.field ("text")
field.add "class","form-control"
field.add "placeholder","turn any text into a QR code"
field.add "name", "qr"
field.add "maxlength",50
field.add "required",true

set field = form.field("submit")
field.add "class","btn btn-warning"
field.add "html","create QR code"
field.add "style","margin-top:5px"

form.build
%>