Checkout 0 euro - Page 2 - Post ID...

User 187934 Photo


Senior Advisor
20,271 posts

There's no need to go to all the extra work of altering the confirmation page or email or files. You can have your total populated into an input within the form that you have added through the formbuilder app. This input can be set to be hidden with jQuery if needed. Now this input is available either through the [variable_name] or through the $_SESSION variables that the form builder uses.
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. I tried to make the calculation field, but it didn't work out. But in the Confirm Page I want to use a conditional, so the bottleneck is to be able to use jQuery in the Confirm Page, because I would like to use:
if (field) > 0 {show or hide}. Is it correct that I need jQuery if I want to use "if"?
User 473299 Photo


Registered User
144 posts

Maybe I can have a hidden field populated with the text I want to show after checkout. Another way of thinking indeed.
User 187934 Photo


Senior Advisor
20,271 posts

Linda Menkhorst wrote:
Thank you. I tried to make the calculation field, but it didn't work out. But in the Confirm Page I want to use a conditional, so the bottleneck is to be able to use jQuery in the Confirm Page, because I would like to use:
if (field) > 0 {show or hide}. Is it correct that I need jQuery if I want to use "if"?

If a field is 0 then set it to disabled in the formbuilder with jQuey and it won't get submitted.
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 really want to use jQuery in the Confirm Page and Email to get many possibilities.
I did this check. I put this same code (only this) in Confirm Page, Confirmation Email and the Payment Page.
The first two give xxx as a result, the last one gives 12345 (correct), so there is a difference in
the execution.

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
var valone = "12345";
$('#pay').text(valone);
});
</script>
<p id='pay'>xxx</p>
User 187934 Photo


Senior Advisor
20,271 posts

The difference your seeing is why I do everything I can through the form builder so your not having to keep track of so many files and because they are handled different.
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 agree, I finally got the optional text working with a display rule.
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <script type="text/javascript">$(document).ready(function(){
$('input[name=optional_text]').attr('readonly', true);
var optional_text = "This is the optional text to be placed in the email";
$('input[name="optional_text"]').val(optional_text);
});</script>
User 187934 Photo


Senior Advisor
20,271 posts

Great! Sometimes it's hard to fully understand what a person is trying to do but I enjoy seeing others have success with their forms. The Coffeecup form builder is truly a wonderful app because they make it possible to get at the code and do custom alterations.
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

Web Form Builder is really very powerful, playing with it the last two weeks, brought me along php and jQuery and now doing as much as possible with the possibilities itself.
Current solution is, the one described above and added a class invisible with css for hiding building the email components. And I added a display rule on the readonly input field, so when a certain option is selected it is displayed or not displayed. The css does not effect showing up in the results, so perfect, it depends on the display rule. I removed the readonly line.

<style type="text/css">.invisible {
display: none;
}
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <script type="text/javascript">$(document).ready(function(){
$('input[name="email_contant"]').addClass("invisible");
var optional_text = "This is the optional text to be placed in the email";
$('input[name="optional_text"]').val(optional_text);
});</script>
User 473299 Photo


Registered User
144 posts

Thank you Eric for all your tips.
So even shorter, I skipped the css style and used:
$('input[name="email_contant"]').css("display","none");

For Targetpay to use e-acceptgiro I used this code in the confirm page and confirm email:
<a href="http://www.qtouch.nl/myscript.php?i=accept&wd=[firstname]-[lastname]_[_submitted_]&wa=[_cart_total_]"><img src="http://www.mypage.nl/e-acceptgiro.jpg"></a>

if ($_GET['i']=="accept"){
/* remove space from the date/time to create the invoicenumber */
$invoicenumber = str_replace(' ', '_', $_GET['wd'] );
/* remove thousand and decimal seperators from the cart total to create the amount in cents */
$amount = str_replace( array(',', '.'), '', $_GET['wa'] );
$call="Location: http://e-acceptgiro.nl/mynumber/56e5/{$ … nt}";
header($call);
}

Next puzzle is see if I can make <a href> optional in the final email and confirm page instead of only text.

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.