How do I hide a contact form field until another field is filled?

Shopify Partner
2 0 0



I would like a simple script in global.js which follows the logic below but I need your help in writing the script.


If "Name" field =  blank

Hide "Comment" field


Show "Comment" field


Can someone please help me? I provided a screen shot of the form and its HTML.

I understand there are multiple form apps that have conditional logic but I want this to be a learning experience for me. Thank you.


The shopify store is with the store PW = "help".




Replies 0 (0)