There were no elections during the war, the last having taken place in April and May 1914 and resulting in a victory for the left, with the socialists going from 72 to 102 deputies. When the war began however a political truce was established, with parliamentarians following President Raymond Poincaré's call to create a "Union Sacrée" and put aside differences in support of the war effort. In an extraordinary session in December 1914 the two Chambers of Parliament agreed to suspend elections for the remainder of the war. Most of the legislative work during the conflict was thereafter done not in open chamber but in private meetings and commissions, which operated like the committees that exist in the American Congress.
As for deputés from the occupied territories, almost all of them were in Paris when their constituencies were invaded. They decided to remain there in the belief that they would be more useful to their constituents in Paris rather than behind German lines. This was probably the case, as they ended up creating a pressure bloc in Parlement able to win support to help feed their departments, although in practice organizing aid for the occupied zone ending up being a difficult task.
You might also be interested to know that Parliamentary deputés were not initially exempt from military service and 200 were mobilized at the beginning of the war, although only sixty ended up going to the front, of whom ten deputés and one senator were killed in action, while another six were killed while in parliamentary service, such as Abel Ferry who was mortally wounded by shellfire while visiting troops on the Aisne front in September 1918.
Municipal elections were also suspended in the occupied zone during the war. The last elections had been held in 1912, and during the war many mayors complained of personnel shortages because other elected officials had been mobilized or fled the German advance. Mayors generally acted as the buffer between their communities and the German occupiers, and had the unenviable task of trying to balance between acceding to Germany's increasingly callous demands for food and labor and protecting their constituents. In most cases they had to appoint new officials directly without elections, and often the Germans simply replaced recalcitrant mayors with more accommodating officials. A final note of interest is that in the absence of men, many women had to take over the duties of local officials, especially in smaller communities.
Sources
Bock, Fabienne. "Governments, Parliaments and Parties (France)." 1914-1918 Online. International Encyclopedia of the First World War. Last modified June 15 2015. https://encyclopedia.1914-1918-online.net/article/governments_parliaments_and_parties_france
Druelle, Clotilde. Feeding Occupied France during World War I: Herbert Hoover and the Blockade. London: Palgrave MacMillan, 2019.
Nivet, Phillipe. "Les municipalités en temps de guerre (1814-1944)," in Parlement[s], Revue d'histoire politique 20, no. 2 (2013): 67-88.