Greying out a button until form text has been entered?

Hello,

Just a simple one (I hope)! Is there any way to ensure that a button is greyed out until text is entered into a form?

Thanks