What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.
At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.
We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.
Form Calculations And Conditions Does Not Work AlwaysAsked by Mareid on January 07, 2015 at 11:04 AM
My organization has two different membership payment periods, Jan-April and May-December. We collect $15 for the Jan-April period and $30 for the other months. I have a calculation, based on the string value of the date (which shows as 1/6/15, for example, and if that value begins with 1 or 2 or 3 or 4, a field (my payment) is populated with 15 and the payment button showing 15 is displayed and the one showing 30 is hidden. If the datestring begins with 5 or 6 or 7 or 8 or 9....etc, my payment is populated with 30, and the button showing 15 is hidden and the one showing 30 is displayed. Sometimes, but not always, the mypayment field is blank and both buttons show. This doesn't happen every time or for all of my testers. And it seems to work perfectly when tested on the Jotform site itself. It happened once or twice on my own computer, using Firefox, and then it started working. Now I can't get it to fail on my computer either with Firefox or IE. I've uploaded a screenshot, called goodform.png where the bottom part of the form shows what it SHOULD look like. When it fails, both buttons show, the mypayment field is blank and the paypal link works but has no dollar amount filled in.
here is a link to my form on Jotform: http://www.jotform.net//?formID=50055250702139
here is a link to my embedded form on my website: http://wgri.org/wgri-webpages/happenings.html click on the "Become a Member" link on the page to see how the jotform is integrated into the website.
I believe this is because you have conflict in your conditions. Probably the repeated use of the textNumberDate in conditions 1, 2 and 4.
I would suggest using this condition instead.
What my condition states:
1. If textNumberDate begins with "01" OR "02" OR "03" OR "04" insert the value "15" to Dues.
2. If Dues is equal to "15" SHOW the button "Pay $15 via Paypal"
3. If textNumberDate begins with "05" OR "06" OR "07" OR "08" OR "09" OR "10" OR "11" OR "12" insert the value "30" to Dues.
4. If Dues is equal to "30" SHOW the button "Pay $30 via Paypal"
I'm not sure if I get your condition correctly. You can check my cloned form here: http://www.jotform.com/form/50064783879973. You can test a couple of dates on it, I've un-hide my date field on that form. If it works as you expected you can clone it using this guide: How To Clone Form Using Form URL
I hope this helps. Let us know if this works.
I used the version above, however some users are still seeing two rows of buttons which should be precluded by the code. I had originally thought it might be some sort of caching problem, but it appears now to be more of a race condition. I have started versioning the form, and even when the latest version appears in someone's browser, the calculations are still not completed properly and two rows of buttons show up. Even the users with failures eventually get the form to come out correctly after a few tries. I'm stumped; I can't duplicate the problem on my own computers and tablets. There are both correct and working versions on almost every platform/browser combination various testers have tried.
The form is really not usable as it. I'm hoping I can find a solution before abandoning JotForm.
Further info: There are two rows of submit buttons, one says Pay $15 via PayPal and the other says Pay $30 via PayPal. One is to be hidden and the other shown based on the date of the submission; between January (01) and May (05) $15 is to show and $30 is to be hidden. The other months of the year (06-12), $30 is to show and $15 is to be hidden. The whole point of the double row of buttons is provide the user with a single button with the right payment amount depending on the month of the year.
I have a similar case in my end. I'm also unable to replicate the problem of your users, so I'm guessing it's more of a browser related problem in their end. Have you re-embed the form in your website after making the changes? You can use this guide on what form code to use: Which Form Embed Code To Use? Or are you sharing the direct URL for the form?
As I've understood from the first post, if the current date is between January-April (as you have mentioned above) the value of "15" will be inserted in "Dues" and the button "Pay $15 via Paypal" will show, while if the date is May-December, the value of "30" will be inserted in "Dues" and the button "Pay $30 via Paypal" will show.
We'll wait for your response.
Jan to May is 15 and June to Dec is 30.
i have not reimbedded the form but the most current version is being displayed I testers.
Oh. Okay. You can, however, edit the suggested condition that I have.
I would recommend that you re-embed your form code again to your website so that the changes may apply properly. Also, upon checking it in Firefox, I'm seeing the problem now. But, when you refresh the problem does appear to solve itself.
<iframe id="JotFormIFrame" onload="window.parent.scrollTo(0,0)" allowtransparency="true" src="//support.jotform.com/form/50068314139956" frameborder="0" style="width:100%; height:624px; border:none;" scrolling="no"></iframe>
Please do take note again that you should get your own iframe code in your "Embed Forms" setting and adjust the height with your preferences.
Let us know if this works.
Ok trying the iFrame code instead. I'll let you know
Thank you for trying, please do let us know if it works. We'll wait for your response.