Can this program do calculations? -...

User 406086 Photo


Registered User
23 posts

Here's my abbreviate version for testing:

http://store.beckleather.com/TestOrder.html
User 187934 Photo


Senior Advisor
20,190 posts

From what you posted.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript">
var jQ = $.noConflict(true);
jQ(document).ready(function(){
//The inputs you want read only
jQ('input[name="total1"]').attr('readonly', true);
jQ('input[name="total2"]').attr('readonly', true);
jQ('input[name="grand1"]').attr('readonly', true);

//inputs that will need to be calculated
jQ('input[name="qty1"]').addClass('cal');
jQ('input[name="qty2"]').addClass('cal');
jQ('input[name="price1"]').addClass('cal');
jQ('input[name="price2"]').addClass('cal');


jQ('.cal').bind('keyup keypress blur click',function(){

// Set variables for each input by name
var qty1 = jQ('input[name="qty1"]').val();
var qty2 = jQ('input[name="qty2"]').val();
var price1 = jQ('input[name="price1"]').val();
var price2 = jQ('input[name="price2"]').val();
//subtotal 1
var subtotal1 = (qty1 * price1);
if(subtotal1 > 0){
jQ('input[name="total1"]').val(subtotal1.toFixed(2));
}

// Subtotal 2
var subtotal2 = (qty2 * price2);
if(subtotal2 > 0){
jQ('input[name="total2"]').val(subtotal2.toFixed(2));
}
// Summing all the subtotals
var grandtotal = +subtotal1+ +subtotal2;

// This will be your grand total
if (grandtotal !== '' && !isNaN(grandtotal) && grandtotal > 0) {
jQ('input[name="grand1"]').val(grandtotal.toFixed(2));
}

});

});</script>

Seems to work here.
http://ericrohloff.com/coffeecup/ccforu … m-cal.html
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 406086 Photo


Registered User
23 posts

Holy cow, Eric!!!! That's amazing!

Thank you VERY much!!!!

Larry
User 2720856 Photo


Registered User
16 posts

What is the purpose of the element that appears below Grand Total and above the Email field? It doesn't appear there initially.

Thank you,

Joe
User 187934 Photo


Senior Advisor
20,190 posts

Hi Joseph,
I'm not seeing the elements you asking about.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 114736 Photo


Registered User
8 posts

Hi Eric,

This is exactly what I need on my form! I need it to add up totals and a grand total at the bottom.

But a couple questions. Is it possible to have my pictures above the item? Just like it's on my form now.

Also, I need it to do the following if possible.

If the grand total is less than $999.00 then the payment information fields will show up and it will be required for the person filling out the form to put in the information. If the grand total is over $1000.00 then the payment field will NOT show up and the person filling out form can simply click submit.

link here. I can't attach my web form builder file. it won't let me here because it's not a txt.snp.zip.rsd.rml.rmlp.red etc.

http://wwwsliders.coffeecup.com/forms/R … er%20Form/

Thank you !!!!
~seacow
User 114736 Photo


Registered User
8 posts

I posted my web form builder file here https://www.coffeecup.com/help/myroom/397188/
~seacow
User 187934 Photo


Senior Advisor
20,190 posts

Hi seacow,
Add all of the inputs needed and where you want them. Then I'll give you some instructions on how to go about this.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 114736 Photo


Registered User
8 posts

I did exactly what It says here http://ericrohloff.com/coffeecup/ccforu … ost_grand/ but when I put it into an HTML element at the top nothing happens when I preview it. what am I doing wrong? screen shot attached. http://wwwsliders.coffeecup.com/forms/R … er%20Form/
Attachments:
~seacow
User 114736 Photo


Registered User
8 posts

got it working. will input all the fields and where I want them as you said and I will let you know when I got them in.
~seacow

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.