Show _form_price_ - Post ID 256787

User 473299 Photo


Registered User
144 posts

Can I show the price building up during selecting options on my form.
It doesn't show when I have a html field with [_form_price_], this argument is not replaced.
How to?
User 187934 Photo


Senior Advisor
20,271 posts

You need to add some kind of calculation script to the form builder. I have several examples on here. Try searching for calculations and post back if you need a few hints.
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 473299 Photo


Registered User
144 posts

I couldn't figure out the calculations, now I found another solution, I show images when someone selects a workshop, so there is a visual cue and I put the amounts in the description. http://quantumallergy.coffeecup.com/for … fform-new/
User 473299 Photo


Registered User
144 posts

It should show [_cart_total_], so a calculation is not necessary.
User 187934 Photo


Senior Advisor
20,271 posts

It does at the payment end. I've wrote several examples in this forum for uses.
Here's a simple code example that you can tweak to meet your needs.
<script src="http://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(){
jQ('input[name=test3]').attr('readonly', true);
jQ('input[name=test1],input[name=test2]').keyup(function(){
var valone = jQ('input[name=test1]').val();
var valtwo = jQ('input[name=test2]').val();
var total = (valone * valtwo);
if(total > 0){
jQ('input[name=test3]').val(total.toFixed(2));
}
});
});</script>
<input name="test1" />
<input name="test2" />
<input name="test3" />
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 473299 Photo


Registered User
144 posts

Thank you!
User 473299 Photo


Registered User
144 posts

How do I retrieve the value of _cart_total_, something like this?
var valone = $( "#_cart_total_" ).val();
User 187934 Photo


Senior Advisor
20,271 posts

Linda Menkhorst wrote:
How do I retrieve the value of _cart_total_, something like this?
var valone = $( "#_cart_total_" ).val();

Only if the id of your input is _cart_total_
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 473299 Photo


Registered User
144 posts

It is the value after sending the form, it's one of the values in the payment process created by WFB.
User 187934 Photo


Senior Advisor
20,271 posts

The value of the cart total will be what ever input you decided to be your total. For my example I used input names as it's much easier to keep track of and do directly with the form builder itself. The example I posted was only that and the inputs I used were there only to make sure you could see it working right away. Tweak the code to match your actual formbuilder input names and don't use the inputs I posted in my code.
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

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.