Building Custom Forms in Drupal 7 I'm new to Drupal 7 and installed it on my local machine to play around.

I'd like to build a basic Job Posting Form and wanted to ask about questions/best practices regarding Drupal.

This was the process I was going to follow:


Create a new content-type "job", add a title, description and pay - all text fields.
Create a new module, then within the module build out the custom form to create a new job listing.  How do I associate the new form with the content-type?  Should I build the form code in my custom theme folder (template.php) or in a new module?
When the form is submitted, how does the data get saved?  How do I associate the submitted form with the database?  Most of the examples using the Form API only mention building the form but not how to store the data (in my example, storing the "job" as new content).


I'm not asking for you to write code for me, but I'm having a difficult time understanding the workflow and best practices for working with Forms in Drupal 7.  Any good guides on how to accomplish what I need would also be appreciated.
Great to know you're exploring Drupal! :D

Create a new content-type &quot;job&quot;, add a title, description and pay -
all text fields.

Since you want to ask data from users or something like a survey, Geek Alvaro J Hurtado V is right. The Entityform module is the way do go since it uses entities and fields which are future proof and used in Drupal 8.
Brings me to another module called Views, Entityform works well together with the Views module. This module helps to create data lists without any coding needed. This is one of the most used module in the Drupal world. Check it out if you have time. :)

How do I associate the new form with the content-type?
When the form is submitted, how does the data get saved? How do I associate the submitted form with the database?

The Entityform module already handles this for you out of the box.
So what you need to do is to create your survey form using the Entityform module and you're basically good to go. You would have:

A public form where your anonymous/not logged in users can fill-up.
A content type where it relates the data submitted by the user.
A page which lists all the user submitted data.