The only formality on arriving in Morocco is the need to complete an entry “certificate”.
This is arequirement of the immigration police and is checked along with your passport when you arrive at the airport.
On your flight in you should be given a form to complete before you are allowed entry into Morocco. These are issued for flights or ferry so you cannot enter without being scrutinised.
The form is simple and asks for info on your occupation, home address, passport details including number and issuing office so have this handy and where you are staying in Morocco. Be sure to have a pen with you and complete the form before you lan so as not to hang around too long in arrivals.
This is the only thing which slows your entry down as immigration control can be painfully slow.
If you intend to move around Morocco, you will be asked to complete a similar document in each hotel or guest house you check into.
Note – your passport should normally be valid for at least six months before you enter Morocco although there is conflicting infomation in the forums of TA.
I will post a copy here when I am able.