2

Searched a lot but didn't found anything removing the

Lables like "First Name, Last Name, City, Address, Email, Phone etc"

Add Placeholders in all "shipping fields" and "sign In" places. After Login Placeholders in "new add address popup"

https://imgur.com/Wm3aQNj

Please help me struggling from so many days didn't found any exact thing.

5

I don't find any proper solution but give you quick and good solution.

Magento checkout's input fields are render by Magento_Ul module component's file

vendor/magento/module-ui/view/base/web/templates/form/element/input.html

On this files, you need to changes

placeholder: placeholder to placeholder: label

So, first copy this html to your frontend theme folder

app/design/frontend/{Vendor}/{Themename}/Magento_Ui/web/templates/form/element/

On this input.html add this code:

<input class="admin__control-text" type="text"
    data-bind="
        event: {change: userChanges},
        value: value,
        hasFocus: focused,
        valueUpdate: valueUpdate,
        attr: {
            name: inputName,
            placeholder: label,
            'aria-describedby': noticeId,
            id: uid,
            disabled: disabled
    }"/>

Then, you need to add _extend.less at your theme folder

app/design/frontend/{Vendor}/{Themename}/Magento_Theme/web/css/source/_extend.less

add this code for hidden the label css:

.checkout-index-index label{display:none}

Then You must flush cache by run

php bin/magento cache:flush

Or delete all files from view_procecced, cache,page_cache.

Then you should static content deploy

php bin/magento setup:static-content:deploy

  • This Solution is working but partially. Some Placeholders are not coming and some Lables (Street Address) is not hidden via the above solution. Screenshot After the solution imgur.com/iuzL93e – Vinay Oct 18 '17 at 18:25

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.