Spain has proclaimed a number of Constitutions. The current Constitution of Spain of 1978 is the culmination of the Spanish transition to democracy.
The idea of a national constitution for Spain arose from the Declaration of the Rights of Man and of the Citizen initiated as a result of the French Revolution. The earliest constitution was written and promulgated in 1808 when Napoleon invaded Spain, Bourbon monarchs Ferdinand VII and Charles IV abdicated, and Napoleon placed his brother Joseph Bonaparte on the throne. A constitution was drafted and the Junta Española Joseph I signed it. A major feature of the Constitution of 1808 was the provision for representation by Spanish America on an equal basis with the peninsula. Although signed by Spanish aristocrats and the new monarch, few in Spain recognized this document.
With the eruption of the Peninsular War to oust the French invaders. A new Cortes was summoned and met at Cádiz, which included Spanish American and Philippine delegates, and promulgated the Spanish Constitution of 1812. This constitution is generally recognized as Spain's first written constitution since it was drafted freely by delegates of the Spanish Empire.
During Francoist Spain, there were many attempts to create stable institutions that did not (at least directly) emanate from Francisco Franco as they did in the post-war period. The Fundamental Laws of the Realm (Spanish: Leyes Fundamentales del Reino) were a constitution in parts enacted through nearly 20 years starting in the 1950s. They established the very institutions that would later, under Juan Carlos I and Prime Minister Adolfo Suárez, commit "constitutional suicide" and pass the Political Reform Act, starting the Spanish transition to democracy. Most of those Laws theoretically provided for a quite free state, but ultimately the power of the Caudillo was supreme.
Finally, the constitution in force is similar to the (unwritten) British democratic monarchy model, but the 2014 Catalan self-determination referendum has provoked calls for an entirely democratic federal republican model.
Below there is a comprehensive table, but this is an overview: