In dynamics if form is created by listpage template, it would not let you write any code on form level.
Best practices says that you have to wrote code in extended interaction classes. But what if we have to write simple method at form levels, For such cases you can write events or method like modified or clicked on controls.
You can write method or event of button or control by changing “DisplayTarget” property to “Client”.