In my form building function I need to render some things basing on user's actions. But if the form building function is called for the very first time I want to put a form deliberately in slightly inconsistent state (I have my reasons, long story).
How can I reliably detect if the form building function was called for the first time, or if the form was already presented to the user and now it's built due to AJAX call or to allow user to fix input errors?
Currently I'm using
empty($form_state['input']) but I have this feeling there is a better, more reliable way and I forgot it.