Forums

hidden fields

?
Guest 04 May, 2013
hi all,
I am having a prob with getting the logic straight on the processing of a couple hidden fields.
a table is holding a portfolio of products bought at diff points in time.
upon selling them - partially - FIFO (first in first out) is to be employed upon booking them out so that after the first sales the table for a single product should look as depicted in img1

on the submission form fields cf_id, cp, cp_ids, cp_quantities are hidden fields
Field cp is boulian and indicates if the respective posisiton is a closing position or not
Upon saving the only sales not only should db save create dataset 6 but it should also split the sales quantity (750) amongst the oldest purchases (highlightest in pink)

With several sales the above table might then look as depicted in img2

Only how am I to get fields cp_ids and cp_quantities filled? I am struggling with getting the logic sorted.
Could somebody pls help?

J!2.5.9; CF4.0 RC3.5.2
Max_admin 10 May, 2013
Hi Gabriela,

I'm not sure I can understand the question but if your form has hidden fields with names matching those 2 fields then they will be saved, you may also inject the data into the form data array using a custom code action.

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.