No.
Each Special Order Item is a "Line Item" therefore I just need to store the result of the following:
req-item-quantity * special-item-price
in the custom field:
special-item-line-total
For THAT SINGLE Req Item post, that is created when the form with ID 1269 is submitted.
IN THE FUTURE I will want to store a total for multiple Req Item posts in the loop BUT THAT IS NOT WHAT I AM TRYING TO DO RIGHT NOW.
RIGHT NOW, I just want a SUBTOTAL FOR EACH INDIVIDUAL Req Item BY ITSELF to be stored in the field special-item-line-total. The subtotal value is equal to req-item-quantity * special-item-price FOR THAT SINGLE POST.
I DO NOT NEED TO DO ANYTHING WITH OTHER POSTS IN THE LOOP RIGHT NOW. ONLY THE POST CREATED WHEN FORM ID 1269 IS SUBMITTED IS OF CONCERN FOR THIS TICKET.
Please do not take my all caps writing as me yelling, I am just using all caps for emphasis. I hope we can be on the same page now. I am very close to the solution, the code starting on line 203 THROUGH LINE 211 of my functions.php should do what I am trying to do but it is not working. The code should do the following:
special-item-line-total = req-item-quantity * special-item-price
I have the following shortcode as an example of what I am trying to accomplish, the shortcode produces the correct result, I just need it done in PHP so that the result can be stored in a custom field:
[calculate] [types field="special-item-price"][/types]*[types field="req-item-quantity"][/types][/calculate]
For simplicity sake, let's only use requisition 7700 for reference
hidden link
The only form we are concerned with is the one that has the BLUE BUTTON LABELLED "ADD". That is form 1269.
Let's not look at any other requisitions, as 7700 is there for testing purposes. We also don't need to do anything with any other buttons besides the BLUE ADD button, as they will change the status of the requisition which affects the visibility of various elements of the template.