There were local elections for administrative councils during the 19th century, elections for a constitutional assembly (majlis al-umma) in 1876-78 after significant agitation for constitutional reform - a short lived experiment.
There were elections when the assembly was reconstituted in 1908 following the Young Turk coup. Those voting were generally males with financial standing. The original assembly was chosen from elected administrative officials from the regions - later representatives were elected.
The assembly initially was generally limited to approving budgets and the later assembly had further powers to propose bills and budgets to be approved by the caliph after the upper chamber reviewed them for compliance with shara, economy, morality etc The upper chamber was also permitted to pass some laws in accordance with shara along with the caliph.
Both lasted for short durations and had minimal impact.
To conflate this phenomenon with democracy is to confuse different phenomenon.
Democracy posits sovereignty (final authority and power) to be with parliament - these elections and institutions posited sovereignty to be with Allah, the caliph exercising it via the implementation of Qur'an and Sunnah and elections being for administrative input or after the secular young turk revolution, division of the caliph's authority with these chambers.
At no point was god to be marginalised from sovereignty. That would have been kufr and no scholar would have permitted it. Today modernists claim that is acceptable.
Great answers start with great insights. Content becomes intriguing when it is voted up or down - ensuring the best answers are always at the top.
Questions are answered by people with a deep interest in the subject. People from around the world review questions, post answers and add comments.
Be part of and influence the most important global discussion that is defining our generation and generations to come