Hello @madglaz,
I’m sorry, but I cannot respond to your question without additional details, and the link to your webpage for checking the form in action.
How are loaded the music bands and from where?
Best regards.
Oh that’s easy. You can find the price check here. Its a very simple form. You just fill in a couple of things on the top and below the prices are calculated. Love to hear from you!
Hello @madglaz,
If you want change the form’s structure based on the calculated prices, I recommend you a different implementation, that I will try to describe with an example. Assuming there are three bands:
Band 1, whose logo is: http://www.yourwebsite.com/band-1.jpg, and the equation to calculate its price: fieldname1*2+fieldname2*3
Band 2, with logo: http://www.yourwebsite.com/band-2.jpg, and the equation: fieldname1*4+fieldname2*2
and Band 3, with logo: http://www.yourwebsite.com/band-3.jpg, and the equation: fieldname1*3+fieldname2
First, insert a “HTML Content” field in the form (where will be displayed the result) with the following piece of code as its content:
<div class="result-container"></div>
Second, insert an unique calculated field with an equation similar to:
(function(){
var result = '', list = [], tmp;
tmp = fieldname1*2+fieldname2*3;
list[ROUND(tmp)] = '<tr><td><img src="http://www.yourwebsite.com/band-1.jpg"></td><td>€ '+tmp+'</td>';
tmp = fieldname1*4+fieldname2*2;
list[ROUND(tmp)] = '<tr><td><img src="http://www.yourwebsite.com/band-2.jpg"></td><td>€ '+tmp+'</td>';
tmp = fieldname1*3+fieldname2;
list[ROUND(tmp)] = '<tr><td><img src="http://www.yourwebsite.com/band-3.jpg"></td><td>€ '+tmp+'</td>';
result = '<table>'+list.join('')+'</table>';
jQuery('.result-container').html(result);
})()
and that’s all.
If you need additional help implementing your project, I can offer you a custom coding service from my private website:
https://cff.dwbooster.com/customization
Best regards.
Oh Wauw that is exactly what I wanted. It works like a charm! You are great thank you so much!!