The first thing to consider when designing web forms is its utility: where on site you are going to use it and what is the meaning of the form. A log in or a signup web form is not the same with the form used for placing an online order for something or a service, they are very different in matter of content and their place inside a website.
You must keep in mind that users (especially first time users) love to play with the service (the website and what its content) instead filling long web form for an account they might never use in the future or for something they will never buy. So try to keep your user requirements minimal when filling any form. Let them explore your site, if you need from him lots and lots of data in order to make an order or to complete the user profile for a social media website or network break the data into several web form with the essential information only, on specific sections.
In order to have an effective and usable web form (any web form) you need 3 important things: the HTML tags of input elements encapsulated inside a <form> tag, a computer programming language to generate (if necessary) and to get and post the data and a SQL database to store the data.