I have a template which have a couple of variables, such as
$tempTitle (String)
$tempQuality (list of Strings)
where $tempTitle is just a string and $tempQuality is a list variable given in the template.
Now, I have spent a lot of time trying to figure out how I'm supposed to do this, and my employer should probably kill me for spending so much time on just nifty feature...
I'm trying to rename the title with the code given by Nelson in this answer, which works on $tempTitle. However, I'm not able to write more code that actually are able to evaluate the $tempQuality and include this evaluation in the title.
My code as it stands now (not working)
## @noparams
<script>
$("input[name='variableValues.tempQuality']").change(function(){
var KEnr = $(this).val();
});
$("input[name='variableValues.tempTitle']").change(function(){
console.log($(this).val());
$("form[name='filltemplateform']").find("input[name='title']").val($(this).val())
})
</script>I completely fail to understand how the Confluence macros handle data from template variables, can someone please enlighten me? I'm going completetly bonkers over how riddiculously difficult it is to have some sophisticated dynamic content in Confluence.