Hello,
I want to handle two items with their corresponding prices to PayPal using PayPal Redirect.
It works fine with ONE item/amount (i.e., no array).
For two items I need to define item, (quantity) and amount as arrays. To do so I have set up:
[list] a dropdown with Field Name: item[]
2 Text fields with Field Names: amount[0] and amount[1][/list]
this also works fine, both when one or two items are selected.
My goal is: a single-select dropdown and optionally a second item to select by a checkbox. I have a checkbox named item[1] and amount[1] is a defined amount - THIS works fine.
BUT: for amount [0] that corresponds to the dropdown-selected item[0] of course I don't want to use a textfield but I want to link the options to their predifined prices/amounts.
I feel that I am close to my goal but I can't reach it😟
Could you please give me a hint how this can be handled? I tried different approaches but without success. Also the idea to set $form->data["amount[0]"] was obviously not a good one (nevertheless, it should be possible to assign such an array- value???)
Any help appreciated,
ivo
I want to handle two items with their corresponding prices to PayPal using PayPal Redirect.
It works fine with ONE item/amount (i.e., no array).
For two items I need to define item, (quantity) and amount as arrays. To do so I have set up:
[list] a dropdown with Field Name: item[]
2 Text fields with Field Names: amount[0] and amount[1][/list]
this also works fine, both when one or two items are selected.
My goal is: a single-select dropdown and optionally a second item to select by a checkbox. I have a checkbox named item[1] and amount[1] is a defined amount - THIS works fine.
BUT: for amount [0] that corresponds to the dropdown-selected item[0] of course I don't want to use a textfield but I want to link the options to their predifined prices/amounts.
I feel that I am close to my goal but I can't reach it😟
Could you please give me a hint how this can be handled? I tried different approaches but without success. Also the idea to set $form->data["amount[0]"] was obviously not a good one (nevertheless, it should be possible to assign such an array- value???)
Any help appreciated,
ivo