When I use a spell like Form of the Dragon, does my type change? Would I get the type dragon (and lose the type humanoid) for the duration of the spell? I ask, because I want to know if changing form can grant immunity against spells like dominate person.
No, polymorph subschool spells don't change your type.
The Polymorph subschool describes the effects that all spells of that subschool have unless explicitly stated otherwise. It describes a number of things the caster gains from the transformation, including such things as movement types, resistances, and senses. One thing it does not explicitly give you is the Type of the creature you are changing into. Therefore, since it's not telling you that you get it, you're not getting it, unless the specific polymorph subschool spell you're using explicitly states otherwise.
No. In Pathfinder, the Polymorph subscbool only grants you the specific abilities listed in each polymorph spell:
While these spells make you appear to be the creature, granting you a +10 bonus on Disguise skill checks, they do not grant you all of the abilities and powers of the creature. Each polymorph spell allows you to assume the form of a creature of a specific type, granting you a number of bonuses to your ability scores and a bonus to your natural armor. In addition, each polymorph spell can grant you a number of other benefits, including movement types, resistances, and senses. If the form you choose grants these benefits, or a greater ability of the same type, you gain the listed benefit.
That being the case, you only gain the benefits specifically granted by form of the dragon and do not gain the dragon type or the abilities associated with the dragon type.
Polymorph effects (normally) don't change your creature type.
This (unwritten) rule causes a lot of confusion on how things should actually work in Pathfinder, but has been confirmed many times by the devs, as seen here, by James Jacobs (Creative Director):
If a Aasimar used Alter Self to turn into a Human, would it then be able to receive the benefits of Enlarge Person? If so, would it also be able to be affected by Charm Person or Dominate Person?
Although when you use a polymorph spell to change shape you do so into a creature of a specific type, that doesn't actually change your actual creature type. So...nope!
And here, by Jason Bulmahn (Lead Developer):
Stardust is correct. Polymorph spells do not change your type.
Normally it is assumed it changes your creature type, but polymorph spells and effects usually list things that do change while under that effect, like gaining new abilities or losing some, but creature type is never listed under those changes. So, even if a human polymorphs into a dragon, they are still a creature of type humanoid(human). As such, you are still vulnerable to Bane weapons that targets humanoids, but safe from Bane (dragons) weapons.