An appellate ruling on Thursday serves as a lesson to attorneys that getting romantically involved with a client — never a good idea to begin with — can be particularly perilous in a matrimonial case, where parties are often distraught and unstable.

In S.M.K. v. C.R., A-2063-10, the lawyer ended up being virtually stalked — in the form of e-mails, Facebook messages, handwritten notes and unannounced visits — yet could not convince any court that she deserved the protection of a restraining order.