[eluser]CroNiX[/eluser]
That depends entirely on you and what you are doing.
When editing, I send all current data (form fields retrieved from db) from the controller, which is all used in the 2nd parameter of set_value() or whatever. So all fields would have a default value and I'd never run into that problem. You're running into it because you are not using real data and you're doing it wrong (accessing an array as if it was an object...won't work, neither will trying to access a key/property that doesn't exist because you didn't create it for your test)
When creating, obviously these values don't exist and you either don't use the 2nd parameter, or create an object/array with the same key fields with no values and the same form will work for both creating and editing. There are a lot of ways to go here, but it depends on your situation and what you're doing.