When your 7 year old son refuses to go to school you need to make it boring for them to stay home.
Don't allow them to use any toys, watch TV, use the computer etc.
Make the child do chores and make the child stay inside the house all day as well.
In some cases you may need to force the child to go to school by literally dragging them to school or carrying them to school.
Spankings are also sometimes needed to get your child to comply and go to school.
School is mandatory and they must attend school or the parents can get into trouble and go to jail.
When a child refuses to go to school you should first sit them down and talk to them calmly about it.
Ask the child why they are refusing to go to school and see if there's something going wrong in school that is making the child refuse to attend school.
Maybe the child is being bullied, made fun of or is having a hard time learning.
Ask the child if they are being bullied and find out why they are not wanting to go to school.
If it's just because they don't want to go to school then you have to literally drag them to school or wait a day and then say okay you can stay home but the next day you have to go to school.
You have to make it so the child is not having any fun at home and make it really boring for the child to stay at home.
Make the child do chores, stay in their room and make them stay inside the house all day.
When my kid refused to go to school I made him stay home and stay inside the house without watching TV, using the computer and didn't allow him to play with any toys.
I made it boring for him and so he decided to go to school the next day.