Recently, I add a field tag into the filter_workitems.xml, which looks like:
<field name="show_this_week" type="CheckboxCustom" label="sohw this week" description="" value="1" class="" onclick="
var curr = new Date;
var first = curr.getDate() - curr.getDay()+1;
var last = first + 7;
var firstday = new Date(curr.setDate(first)).toISOString();
var lastday = new Date(curr.setDate(last)).toISOString();
document.getElementById('filter_created_from').value = firstday.substring(0, 10);
document.getElementById('filter_created_to').value = lastday.substring(0, 10);
this.checked = false;
this.form.submit();"/>
but found that the field attribute "label" not show as I expected, however "description" attribute show correctly. Wonder anyone know why and how to make label attribute show as it should do? Thanks for your tutoring~
Joomla version is 3.8.12
sohw this week
is not rendered/visible on the page? Is the text also not presented in the generated source code? Does it work without spaces in the value? Does it work if you remove the inline javascript? It seems like a good idea to transfer that js to an external script instead of inline.