Why aren't my placeholders appearing despite correct coding?

Solved

Why aren't my placeholders appearing despite correct coding?

Sten21
Tourist
9 0 1

Sten21_1-1710478908695.png

 

According to everything I have done, my placeholder should appear, however, it doesnt. Cant find anything wrong in the code though.

Accepted Solutions (2)

tim
Shopify Partner
4709 575 1702

This is an accepted solution.

There is a rule in base.css which makes field input placeholders transparent.

You should try adding this to the "Custom CSS"  section setting:

 

.field__input::placeholder {
  opacity: initial;
}

 

If my post is helpful, hit the thumb up button -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com

View solution in original post

websensepro
Shopify Partner
2114 264 313

This is an accepted solution.

Hi @Sten21 ,

Replace this code

 

<input class="field__input font-preview__input" form="product-form-template--19010366800139__main" type="text" id="your-label" name="properties[Namn att printa]" placeholder="Skriv din text här" style="padding: 10px; margin-bottom: 10px; font-size: 18px; border: 2px solid #ccc; border-radius: 5px; width: 100%;" maxlength="5" required="">

 


This correct code

 

<input form="product-form-template--19010366800139__main" type="text" id="your-label" name="properties[Namn att printa]" placeholder="Skriv din text här" style="padding: 10px; margin-bottom: 10px; font-size: 18px; border: 2px solid #ccc; border-radius: 5px; width: 100%;" maxlength="5" required="">

 

 

websensepro_0-1710491639580.png

 


Thanks!

Need a Shopify developer? Hire us at WebSensePro For Shopify Design Changes/Coding
For Free Tutorials Subscribe to our youtube
Get More Sales Using Big Bulk Discount APP
Create Your Shopify Store For Just 1$/Month
Get More Sales Using Big Bulk Discount APP

View solution in original post

Replies 8 (8)

niraj_patel
Shopify Partner
2391 516 517

Hello @Sten21 
Can you share store URL?

Shopify Partner || Helping eCommerce Stores
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution.
- For further discussion contact: Email ID- info@techlyser.com

Hardik29418
Shopify Partner
2913 418 1083

Hello,

Welcome to the Shopify Community.
I read your problem and it seems that I need to analyze your website to provide the solution here.
Would you please share your website URL and if your website is password protected then also provide the password.

- Need a Shopify developer? Chat on WhatsApp or EMAIL ME!


- Your Coffee Tip would do Magic code ❤️
- For Shopify Design Changes | Shopify Custom Coding | Custom Modifications
- Email

tim
Shopify Partner
4709 575 1702

This is an accepted solution.

There is a rule in base.css which makes field input placeholders transparent.

You should try adding this to the "Custom CSS"  section setting:

 

.field__input::placeholder {
  opacity: initial;
}

 

If my post is helpful, hit the thumb up button -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com
Sten21
Tourist
9 0 1

This worked! Thanks

websensepro
Shopify Partner
2114 264 313

This is an accepted solution.

Hi @Sten21 ,

Replace this code

 

<input class="field__input font-preview__input" form="product-form-template--19010366800139__main" type="text" id="your-label" name="properties[Namn att printa]" placeholder="Skriv din text här" style="padding: 10px; margin-bottom: 10px; font-size: 18px; border: 2px solid #ccc; border-radius: 5px; width: 100%;" maxlength="5" required="">

 


This correct code

 

<input form="product-form-template--19010366800139__main" type="text" id="your-label" name="properties[Namn att printa]" placeholder="Skriv din text här" style="padding: 10px; margin-bottom: 10px; font-size: 18px; border: 2px solid #ccc; border-radius: 5px; width: 100%;" maxlength="5" required="">

 

 

websensepro_0-1710491639580.png

 


Thanks!

Need a Shopify developer? Hire us at WebSensePro For Shopify Design Changes/Coding
For Free Tutorials Subscribe to our youtube
Get More Sales Using Big Bulk Discount APP
Create Your Shopify Store For Just 1$/Month
Get More Sales Using Big Bulk Discount APP
Sten21
Tourist
9 0 1

Many thanks!