The BUTTONPLACEHOLDER
is in the wrong place. It will be replace with HTML but it is within a Javascript block. So move out of the <script>
block:
...
<p><input type="range" onchange="updateSliderPWM1(this)" id="pwmSlider1" min="0" max="64" value="%SLIDERVALUE2%" step="1" class="slider1"></p>
%BUTTONPLACEHOLDER%
<script>
function toggleCheckbox(element) {
...