Hi all, I think this might be a bug in the Paypal addon.
How to reproduce:
Create a multipage form with ajax enabled and the following distribution:
- Page 1: Price field, and any number of dummy fields.
- Page 2:
- Radio field with with any options. For example “Payment method” with “Paypal” and “Other” options.
- A PayPal Checkout field with “PayPal Checkout” option checked.
Then create a PayPal Checkout feed, with conditinal logic pointing to the Radio field. For example, only active when “Payment method” is “PayPal”.
Go to the form, fill dummy data on Page 1 if necessary and click Next.
On page 2, select the Radio option to activate the PayPal feed.
Result:
Two PayPal buttons are shown in the form. I have debugged a bit, and noticed that the PayPayl javascript object is initialized on every page load (also after failed field validation). Maybe the script should only initialize on the page containing the PayPal Checkout field, as the Stirpe script does.
Expected result:
Only one PayPal button is shown.