In the Magento 2 Checkout, i need to replace the form input labels (Firstname, Lastname, City etc) with placeholders (text that will show inside the input box).

I found this solution https://diweirich.com/magento-2-using-placeholders-in-form-fields/ but not sure if this is the correct approach as it overrides labels to be considered placeholders.

And here the same workaround is suggested Add placeholder and remove all labels in Magento 2 Checkout

Any solution is welcome.

  • Yes you can go with second link, @AmitBera 's answer is correct. – Ramkishan Suthar Dec 24 '18 at 13:53
  • @RamkishanSuthar i know that Amit's way works, but i'm looking for the best scalable way leaving labels as they are and instead finding a way to use placeholders. – arjus Dec 24 '18 at 14:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.