Add an ‘attribute’ command to any block of type textline with the following values:
type="range" min="50000" max="500000" step="100" value="250000"
Add ‘htmlbefore’ or htmlafter’ command to the block with the following value:
<output class="range-output " for="Inputxxxxx"></output>
Min, max, step and value can be set to preference.
The green xxxxx must be replaced by the actual Block ID. Example: Input12345
output classes: use any style, range-output will be used in the JS code later. range-output can be changed provided it is changed in the JS code as well.
Add the following to the main layout section:
<script>
const inprange = document.querySelector('#Inputxxxxx');
const outrange = document.querySelector('.range-output');
outrange.textContent = inprange.value;
inprange.addEventListener('input', function() {
outrange.textContent = inprange.value;
});
</script>
Result:
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article