No, you don't have to use the $ sign. It's just an aesthetic choice usually.
In your example code above, the function's argument is named form function (link, form). Inside the function, the new variable being declared has a $ to it so as to distinguish it from the argument variable form.