Hi Victor, i was testing this, but never works, never returns a value 🙁
https://formidableforms.com/knowledgebase/frm_validate_field_entry/#kb-calculate-total-time
My instructions to the OP are to use jQuery/JavaScript. But you've chosen to use a WordPress hook that doesn't return a calculated value to the front end.
I don't even understand why Formidable chose the frm_validate_field_entry to show this example. It's the wrong filter to use. The example code doesn't do anything except set values to a list of variables, but nothing in that code makes use of any calculations.
If you want to see the results in real time on the front end, you need to use jQuery, Formidable's hooks fire on the server, not in the browser.
If you want a calculation that's done by PHP and have it returned to the front end, you have to do this in jQuery Ajax. Alax requires a jQuery component and a PHP callback function that returns the calculated value.
If you use jQuery for the entire project, performance will be better becaue everything is handled in the browser and there are no round trips to the server.
Please login or Register to submit your answer