I would like to create items that are multiple numeric, add javascript that will show prices to the items that will update on how many items are chosen. I would like to capture the item values and the prices associated to this.
// Insert the images into the labels
//image values are dollar amounts
$( 'label[for="answer926991X59X530A1"]' ).html( "<img value='20' item-name='bathtowels' src='{TEMPLATEURL}BATHTOWELS.png'/>" );
$( 'label[for="answer926991X59X530A2"]' ).html( "<img value='10' item-name ='handtowels' src='{TEMPLATEURL}HANDTOWELS.png'/>" );
$( 'label[for="answer926991X59X530A3"]' ).html( "<img value='0' item-name='washcloth' src='{TEMPLATEURL}WASHCLOTH.png'/>" );
//insert a new element to display dollar amount
$( '.slider-button-up' ).each(function(){
$( this ).after( "<span class='total'></span>" );
$( this ).after( "<span class='itemVal'></span>" );
}); //END OF EACH
//add a button slider
$('#question{QID}').sliderButtons({
downText: '-', // Text for the "down" button ejp. .down is a class
upText: '+', // Text for the "up" button .up is a class
scrolling: false, // Continuous slider movement if left mouse button held down
scrollInterval: 250, // Interval (in ms) between slider movement when button is held down
valueSuffix: "", // Suffix for callout
});
so basically I have a function that on click of buttons it gathers the price value and multiplies by its respective item for display price
Lime is capturing the value of the item for the survey but now I can asked to capture the price value as well for a DB entry.
Well, that is hardly a visual mockup and appears to be a mashup of several workarounds/plugins.
It seems to me that you would need a hidden multiple-short-text question and then modify the
jQuery UI slider "change" event
to populate that accordingly.
Cheers,
Tony Partner Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.