How can I insert a placeholder in a custom liquid textbox?

Topic summary

A user is attempting to add a placeholder attribute to a custom Liquid textbox in a Shopify section but encountering issues.

Initial Problem:

  • The user has custom Liquid code for a textbox input field but cannot successfully implement a placeholder.
  • An image showing the current implementation was shared.

Solutions Attempted:

  • PageFly-Richard suggested adding the placeholder attribute directly to the input element.
  • The original poster tried this approach but reported it did not work.
  • Another user (ssdc) recommended testing with a simplified input field first.

Working Solution:

  • Vinsinfo provided CSS styling to control placeholder opacity: .field.custom input.field__input::placeholder { opacity: 1; }
  • Combined with adding the placeholder attribute to the input element, this approach successfully resolved the issue.
  • The original poster confirmed this solution worked.

Status: Resolved. The combination of adding the placeholder attribute and specific CSS styling enabled the placeholder to display correctly in the custom Liquid textbox.

Summarized with AI on November 12. AI used: claude-sonnet-4-5-20250929.

Please use below code in style tag,

.field.custom input.field__input::placeholder {
    opacity: 1;
}

Please add placeholder attribute like below,


Please let me know whether it is useful for you.