New Shopify Certification now available: Liquid Storefronts for Theme Developers

Help copy product line property value to another simultaneously

Shopify Partner
2 0 0


My development store is:

PW - "helpme" - please see image for further details.

I am using an app called product personalizer - which created two fields for me called "Name" and "Text". There are behind the scenes conditional logic with those two fields affecting price.

I added in the line property field called "Copy Number and Text Simultaneously" myself in the product-template file.

I am trying to copy the values in Number and Text and then store it in that field whenever the two fields change. I tried document.getElementsByName and whatever else I could find on Stack Overflow. Here is an example of how I am trying to work through it.

I added the below script right below the line property field I created but it was unsuccessful.

var letters = document.getElementsByName('properties[Text]')[0].value;

but it results in Cannot read properties of undefined (reading 'value')

This task is very important to me and I may be underestimating the work required since the app is creating the fields I need, so I cannot access the value easily. If that is the case, please let me know if you are interested in helping me with this task for a monetary gain.

Thank you for your time and help. Appreciate any assistance with this.



Replies 0 (0)