captcha.pt
821 Bytes
<span tal:define="name name|field.name;
css_class css_class|field.widget.css_class;
oid oid|field.oid;
style style|field.widget.style;
"
tal:omit-tag="">
<img style="height:30px; width:auto; margin-bottom:5px;" src="${cstruct}">
<input type="text" name="${name}" value=""
tal:attributes="class string: form-control ${css_class or ''};
style style;
attributes|field.widget.attributes|{};"
id="${oid}"/>
<script>
deform.addCallback(
'${oid}',
function (oid) {
$("#" + oid).on('input', function (evt) {
$(this).val(function (_, val) {
return val.toUpperCase();
});
});
});
</script>
</span>