Add placeholder attribute to text widgets

This fixes #5642

Should I try to write a test for this? Can someone point me to a resource on writing tests for javascript?