Quantcast
Channel: Topics in Category: Can I do this with LimeSurvey? - LimeSurvey forums
Viewing all articles
Browse latest Browse all 17529

HTML/ JavaScript program for input - by: tpartner

$
0
0
If you want to include the dashes and spaces in your data, simply use a short-text type question instead of a numeric type.

If you want to remove the dashes and spaces in your data, replace both instances of this:
thisInput.val(document.getElementById('Zahlenanzeige').innerHTML);
with this:
thisInput.val(document.getElementById('Zahlenanzeige').innerHTML.replace(/\s+/g, '').replace(/-/g, ''));

If you want to replace the dashes and spaces with commas in your data, replace both instances of this:
thisInput.val(document.getElementById('Zahlenanzeige').innerHTML);
with this:
thisInput.val(document.getElementById('Zahlenanzeige').innerHTML.replace(/\s+/g, '').replace(/-/g, ','));

Viewing all articles
Browse latest Browse all 17529

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>