Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

Displaying unacceptable price label in ACBC exercise left of the number

Hello,

As we are working on a Turkish survey, we need the label of ACBC unacceptable price position on the left side of the number. As far as I figured out, it cannot be changed in the ACBC exercise setting under pricing. Do anyone knows how to make it stay on the left side, maybe with an HTML /Java code?

Thanks a lot in advance
asked Apr 1 by CaEr (430 points)
I'm not sure I understand which setting you are referring to.  It sounds like you may be referring to the "Label" setting that appears under the "Use Price in Unacceptables" checkbox - is that right?  That text should already appear to the left of the price in Unacceptable questions.  Could you provide an example of how the text looks now and how you would like it to look?
Yeah you're right, I'm referring to ACBC -> Exercise settings -> Pricing -> Unacceptables.

Now, it displays like Price - More than 455,500₺

But we want it to display as: Price - 455,500₺ more than (here, we will replace "more than" with sth in Turkish.

Thanks!

1 Answer

0 votes
This can be done with some JavaScript, but the exact code may vary depending on how you format your price and what special characters (if any) that appear in the attribute label / "more than" text.  That said, please try adding this script to your Unacceptable questions:

<script>
$(document).ready(function(){
    var regex = new RegExp('^([^0-9\-]*) - ([^0-9\-]*)([0-9.,]*₺)$');
    $('.acbc_rules label').each(function(){
        var match = $(this).text().match(regex);
        if (match) {
            $(this).text(match[1] + ' - ' + match[3] + ' ' + match[2]);
        }
    });
})
</script>
answered Apr 1 by Zachary Platinum Sawtooth Software, Inc. (171,950 points)
huge thanks, it worked like a charm ^.^
...