fillable PDF form created in libreoffice do not work when exported as PDfs

I am trying to create a form in LibreOffice to export as a PDF so that users will be able to make changes to the document. Specifically, I am making a push button with code to flip from one image to another when the user clicks on the image. However, once I export the file as a PDF, the PDF created does not have anything happen when you click on the button. It is as if the macro does not get exported into the PDF.

this is the code I am using:

Dim Doc As Object

Dim Form As Object

Dim Ctl As Object

Doc = ThisComponent

rem Doc = StarDesktop.CurrentComponent

Form = Doc.DrawPage.Forms.GetByIndex(0)

Ctl = Form.getByName("MyButton")

Ctl.Label = "New Label"

Macros don’t get exported to PDFs from LibreOffice, that’s true. There’s nothing you can do.

PDF is an international standard for printing or displaying documents. By definition, it does not provide an input function. I am surprised and disappointed if you were advised to use a PDF document as a data entry function.

I believe there is a website offering Fill PDF online, but how that works you would need to ask them.