105bpm
(105bpm)
September 16, 2021, 7:45am
1
If you would like to add placeholder texts to input fields in Webflow, such as the checkout form you can use my quick solution here.
Steps:
Add a data attribute to all input fields that should use a placeholder text.
Add this script snippet to the page (or the project).
<script>
$(document).ready(function(){
$('input').each(function(index) {
$(this).attr("placeholder", $(this).attr("data-placeholder"));
});
});
</script>
Here is my site Read-Only: LINK
(how to share your site Read-Only link )
1 Like
rodrosolen
(Rod Rosolen)
February 5, 2023, 3:38pm
2
Hello.
It doesn’t work anymore. I am really trying to find something, but nothing is working. It’s a pretty basic style that Webflow e-commerce doesn’t support… unbelievable.
1 Like
Hakon
(HĂĄkon Lilleberg)
June 21, 2023, 8:57am
3
Got it working with this script:
<script>
window.onload = function() {
document.querySelectorAll('input').forEach(function(input) {
input.placeholder = input.getAttribute('data-placeholder');
});
};
</script>
2 Likes
radmitry
(Dmitry Ra)
November 29, 2023, 10:39am
4
Brilliant stuff! Thank you so much!! And while I work on it, I just can’t stop swearing at Webflow for launching such a RAWWWWW product