We just went through this with our 7-year old! The bad habit came from #1 not having a set meal schedule and #2 being allowed to snack.
Children SHOULD follow a general schedule of breakfast a 7, then light snack at 9:30, then lunch, then light snack about 3pm, then dinner around 6pm, then light snack at 8pm. If they don't get up early, they can skip the morning snack. It's actually more healthy to eat small meals throughout the day.
It's hard for us because my stepdaughter is at her mom's and they follow no schedule. Still, we put in our rules and stick to them.
I agree, her helping to cook and then us praising her food has helped. Also, we give her choices "should we have steak or chicken for dinner?"
We have eliminated all junk food from the house and only have healthy snacks. So if she wants a snack it's carrots and ranch dressing, or an apple, or a banana with peanut butter.
For dinner we don't make her eat if she's not hungry, but we do make her sit at the table with her plate in front of her until we're all done. It's our family time, and we've explained that. We definitely don't force her to eat, and we do consult her on what she likes to eat. If she says something like "hot dogs" we say "hot dogs are bad for you, try something else."
If she doesn't eat her dinner when we do, but is hungry later we save her plate and heat it up for her. BUT we make her sit at the kitchen table alone, no TV, no conversation. It's very boring and lonely to try to eat in a silent kitchen all alone.
It only took a few times of her eating her dinner all alone in a quiet kitchen for her to want to eat with the family. We didn't have to force her, she decided all on her own.
And having only healthy snacks, we don't mind if she snacks if she's getting her fruits and veggies. She still snacks, but she eats her dinner with us, and even clears the table now!
Good luck! Just be firm, but don't force them to eat. Just give them choices you approve of so you both win!