In Kingdom of Heaven, Balian was sworn into knighthood by his father, and the people of Jerusalem were as well to "improve" their fighting and to give them courage. During the medival ages, it was known that to be a knight, you had to display a certain amount of chivalry and follow a set code to serve. I was quite please how they incorporated this in the movie, as you can probably tell since I used it in my layout.

Knight's Oath
Be without fear in the face of your enemies.
Be brave and upright, so God may love thee.
Speak the truth, always, even if it means your death.
Safegaurd the helpless and do no wrong.
That is your oath.

[insert random slap here]

And that is so you don't forget it.
Rise a Knight!

Basic Chivalry Aspects
The following is a little about what most medival chivalry was about, this section was take from Wikipedia's chivalry section.

Chivalry in relation to countrymen/Christians:

This contains virtues such as mercy, courage, valor, fairness, protection of the weak and the poor, and in the servant-hood of the knight to his lord. This also brings with it the idea of being willing to give one’s life for another’s; whether he would be giving his life for a poor man or his lord.

Chivalry in relation to God:

This would contain being faithful to God, protecting the innocent, being faithful to the church, being the champion of good against evil, being generous and obeying God above the feudal lord.

Chivalry in relation to women:
This is probably the most familiar aspect of chivalry. This would contain what is often called courtly love, the idea that the knight is to serve a lady, and after her all other ladies. Most especially in this category is a general gentleness and graciousness to all women.

A Real code of Chivalry
As found in the book Chivalry in the 19th century by the French historian Leon Gautier:

Thou shalt believe all that the Church teaches, and shalt observe all its directions.

Thou shalt defend the Church.

Thou shalt respect all weaknesses, and shalt constitute thyself the defender of them.

Thou shalt love the country in which thou wast born.

Thou shalt not recoil before thine enemy.

Thou shalt make war against the Infidel without cessation, and without mercy.

Thou shalt perform scrupulously thy feudal duties, if they be not contrary to the laws of God.

Thou shalt never lie, and shall remain faithful to thy pledged word.

Thou shalt be generous, and give largess to everyone.

Thou shalt be everywhere and always the champion of the Right and the Good against Injustice and Evil.