If $model->theItem is null I’d like to select an element of $listOfItems as a preselected value. I don’t want to use ‘prompt’, I want a default value. How can this be done easily? I’d like to select with the key in the array.
Yeah, I think this is the way to do it. Preparing the model for the view. This is like with the typical load & save calls in create or update actions: if one of them fails the so far populated model will be passed to the view. So why not preparing the model with default values, especially when an object should be created?
Thanks, I think this is it. If no one provides better solutions…