Readout of textboxes for use in dynamic API link

13 0 0

Hey guys,

I am new to Shopify and also an absolute beginner when it comes to coding. Actually, I'm quite surprised that I've managed to implement a few things already. But now it seems like my limited programming wisdom has come to an end.

I've added some lines of HTML code to the product template in order to incorporate the four textboxes you can see in the picture below. All of that appears on the product page. The button that says "QR Code Generator" already does the following: It sets off an API module that generates a QR code with certain (static) attributes like Name, Email and mobile number.

QR Generator.PNG

Now I want to do the following: Instead of generating a static API link, I want the button to trigger a mechanism that reads out the entries of the textboxes and inserts them into the API link. From what I've heard, the addEventlistener function in Javascript could help me out with that. Could I just insert it into the Shopify code file?


Thank you for your answers in advance!