Code advice for variations / text boxes

Code advice for variations / text boxes

PMPrinted
Tourist
7 0 3

Hello, I am hoping someone can help me, I am hoping it is possible to have a text box appear only if a customer selects a variation. This would be for a message inside a greetings card, if the customer selected ' yes please' on my variations I would like this box to be visible. But not if the select no thank you.  

 

I am using the Dawn theme and the text box is coded into the design using the custom liquid feature  on the website editor.  The code currently being used is;

 

<label for="If you have selected to add a message inside the card it can be left here" class="form__label">If you have selected to add a message inside the card it can be left here</label>
<div class="field">
<textarea id="If you have selected to add a message inside the card it can be left here" class="text-area field__input" name="properties[If you have selected to add a message inside the card it can be left here]"form="product-form-{{ section.id }}"></textarea>
</div>

PMPrinted_0-1729513954113.png

 

https://www.pmprinted.co.uk/products/wife-i-have-really-enjoyed-annoying-you-20025

 

Replies 4 (4)

Moeed
Shopify Partner
7544 2035 2501

Hey @PMPrinted 

 

This type of work is not only possible and requires JS and liquid coding in your theme files so if you're not familiar with coding then I suggest you to hire a Shopify developer who can help you out with that. Feel free to let me know if you want me to help you out and I would be more than happy to help you out.

 

Best Regards,

Moeed

- Need a Shopify Specialist? Chat on WhatsApp

- Get a quick Shopify quote – Click here!

- Custom Design | Advanced Coding | Store Modifications


PMPrinted
Tourist
7 0 3

Thank you I thought that maybe the case. I am busy designing the website so will add to the list of things I am out of my depth on!

namphan
Shopify Partner
2690 349 397

Hi @PMPrinted,

Can I send you a collaborator invite? it will help me to check and add JS code for this

Coffee tips fuels my dedication.
Shopify Development Service
PageFly Page Builder Optimize your Shopify store (Free plan available)
Need help with your store? namphan992@gmail.com

PaulNewton
Shopify Partner
7746 679 1614

Hi @PMPrinted  this requires an advanced theme customiation.

 

An alternative is just make these separate products using alternate templates.

https://help.shopify.com/en/manual/online-store/themes/os20/theme-structure/templates#create-a-new-t... 

Then shift where in the user journey a customer makes that choice.

Such as adding links/buttons in both templates to send the customer between the two products.

Or a collection or page as the landing page ,etc

 

If you need this customization then contact me for services
Contact info in forum signature.
ALWAYS please provide context, examples: store url, theme name, post url(s) , or any further detail in ALL correspondence.

Contact paull.newton+shopifyforum@gmail.com for the solutions you need


Save time & money ,Ask Questions The Smart Way


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Thank Paul with a Coffee for more answers or donate to eff.org