Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calculated field returns to zero #3146

Closed
evolluti0n opened this issue Apr 5, 2019 · 5 comments

Comments

@evolluti0n
Copy link

commented Apr 5, 2019

Do You Need Immediate Help?

Ticket opened

Is This A Feature Request?

No. I think is a bug.

What Version Of Caldera Forms, WordPress and PHP Are You Using?

WordPress Version: 5.1.1
PHP Version: 7.3.3
MySQL Version: 5.7.25
Server Software: Apache/2.2.22 (@Release@)

Does Your Issue Persist When You Disable All Other Plugins and Switch To The Default Theme?

Yes

What Is The Unexpected Behaviour?

When an existing form that was previously submitted is being edited the calculated field in the edited form briefly displays the correct value as was saved to the database, and then is reset to zero by the Caldara Forms JavaScript. The other fields which are involved in the calculation have to be manually changed in order for the calculated field to display a value other than zero. The login credentials for the site are: Username: cfdemo Password: !cfsup203321# After logging in, you can observe the issue being described with the following link: https://pprdemo.pyxisys.net/ppr-reviews/new-ppr-review/?cf_ee=1 If you look at the last field on the form - "% No. Of Contracts Reviewed", when you load the page you will see it briefly display the correct value of 42.86 (No. Of Contracts Reviewed/No. Of Contracts Since Last Review = 3/7) and then change to 0.00.

What PHP Errors Have You Logged While Reproducing This Bug?

No errors are reported.

What JavaScript Errors Have You Seen While Reproducing This Bug?

No error are reported in the browser console.

@New0

This comment has been minimized.

Copy link
Collaborator

commented Apr 9, 2019

Hello @evolluti0n , thank you for the details, could you also mention the CF version used and attach the json(zipped) export of the form here please ?
The password access to demo site wouldn't let me in.

@evolluti0n

This comment has been minimized.

Copy link
Author

commented Apr 11, 2019

Hello @New0

Please find attached the exported form.

WordPress Version: 5.1.1
PHP Version: 7.3.3
MySQL Version: 5.7.25
Caldera Forms Version: 1.8.4

calc-fields-go-to-zero-bug-export.zip

@evolluti0n

This comment has been minimized.

Copy link
Author

commented Apr 25, 2019

Hello @New0

The client is asking for an update in https://secure.helpscout.net/conversation/816573104/20074?folderId=2372292

Thanks for your help.

@New0

This comment has been minimized.

Copy link
Collaborator

commented Apr 29, 2019

Hello @evolluti0n ,

I found an issue with defaults calculation values set from previous entry, I opened a PR that fixes this issue ( #3180 ).

You can test using the version built for this branch
1.8.4.3146.zip

@New0 New0 added Bug and removed Needs Feedback From User labels Apr 29, 2019

@New0 New0 added this to the 1.8.5 milestone Apr 29, 2019

@New0 New0 self-assigned this Apr 29, 2019

@New0 New0 added the Has PR label Apr 29, 2019

Shelob9 added a commit that referenced this issue May 16, 2019
Merge pull request #3180 from CalderaWP/feature/3146
Bind calculation value on page load for data set from previous entry Fixes #3146
@Shelob9

This comment has been minimized.

Copy link
Collaborator

commented May 16, 2019

Close via #3146
dca17bb

@Shelob9 Shelob9 closed this May 16, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.