Trump is currently on trial for falsifying financial records. New York law apparently requires him to be present during the trial.
What happens if Trump decides he's not going to attend anyway? It looks like similar things have happened in the past - c.f. this Politics SE question where Trump aides defied subpoenas to testify - and nothing seems to have happened. But "nothing happens" seems like it makes the law toothless, and besides, Trump wouldn't be complaining about not being able to campaign while the trial is in progress.
I'm looking for a legal answer.