Preheat the oven to 350° degrees F. Butter a 9x13-inch pan.
In a small frying pan heat the oil over medium-low heat. Add the onion and garlic, cook until softened, stirring often about 6 minutes. Remove from heat and stir in the dill and parsley.
Squeeze the water out of the spinach in a colander, or in batches using a ricer or by twisting it up in a clean kitchen towel.
In a large mixing bowl whisk the eggs, feta and ricotta cheese together.
Fold in the onion mixture, spinach, ½ teaspoon salt and ¼ teaspoon black pepper.
Unroll the phyllo sheets and cover them with a damp paper towel. Take out one phyllo sheet and lay it in the bottom of the pan - if the ends hang over the edge that's ok. Use a pastry brush to coat it with butter from edge to edge.
Repeat 9 more times buttering each phyllo sheet as you go.
Scoop the spinach filling into the pan and spread evenly from edge to edge. Fold the edges of the pyhllo dough over the filling.
Repeat with the phyllo dough 10 more times being sure to butter each one from edge to edge. Tuck the edges into the side of the pan if possible or trim the excess off with a sharp paring knife and discard.
Butter the top sheet well. Score through the top layer of phyllo with a paring knife cutting it into squares so it will be easy to cut once cooked.
Bake 35 - 40 minutes until deep golden brown on top. Let it sit 5-10 minutes. Cut it into squares along the score marks.