Locking down rate

I wanted the rate to be locked down, but only after the user enters in
a rate. Not sure if this is the correct way to do it, but I wrote an if
statement saying if !rate is false, make readonly.