AlexTCGPro
Member
Hey guys.
I'm very new to fabrik and I'm in need of a little guidance.
I need to record payments.
I created two tables and two forms, one for debts and the other for payments.
The debt table is like this:
ID, year, description and debt
I'm now managing the payment form, which is like this:
Manually type ID, then a cascading dropdown of the years for that ID appears and a cascading dropdown of all the descriptions that person has in that specific year turns up and finally setting those three values would make the debt appear. Then a final field where one can type how much that person is paying at the current moment.
I'm playing with the upsert plugin to update the debt value in the debt form according to what the person is paying, meaning if the person pays full then that value would update to 0, if is paying just a little then I want that value to update to how much debt remains.
For this I need the upsert plugin to update the debt value but only if ID, year and description match for that specific value, just one of those values matching won't do. I suppose that in order to do this I need to set some php code in the condition field to tell the plugin that I want to update the 'debt' field according to the foreign key I have assigned (ID) but only WHERE year and description also match with the fields in the form.
I have found very little documentation about this plugin, what it is on the wiki doesn't even correspond with how the plugin looks now. I'm sure this is something really dumb, I would really appreciate any help.
I'm very new to fabrik and I'm in need of a little guidance.
I need to record payments.
I created two tables and two forms, one for debts and the other for payments.
The debt table is like this:
ID, year, description and debt
I'm now managing the payment form, which is like this:
Manually type ID, then a cascading dropdown of the years for that ID appears and a cascading dropdown of all the descriptions that person has in that specific year turns up and finally setting those three values would make the debt appear. Then a final field where one can type how much that person is paying at the current moment.
I'm playing with the upsert plugin to update the debt value in the debt form according to what the person is paying, meaning if the person pays full then that value would update to 0, if is paying just a little then I want that value to update to how much debt remains.
For this I need the upsert plugin to update the debt value but only if ID, year and description match for that specific value, just one of those values matching won't do. I suppose that in order to do this I need to set some php code in the condition field to tell the plugin that I want to update the 'debt' field according to the foreign key I have assigned (ID) but only WHERE year and description also match with the fields in the form.
I have found very little documentation about this plugin, what it is on the wiki doesn't even correspond with how the plugin looks now. I'm sure this is something really dumb, I would really appreciate any help.