Hi,
I'm trying to take the values entered in two fields in a given form and perform a calculation with them before storing the result on the database. I'm also trying to set the two field's values to 0 before storing the result.
Currently I'm using the pre_submission_handler hook and I can access my values and calculate them.
What I'm stuck with is how do I then go about setting the values that are going to be submitted to the database to whatever I want.
Being a complete newbie at php I managed to somehow get to this:
This displays the right calculation but does not store it on the database.
Any help would be greatly appreciated.