When I am creating a custom asset I would like to be able to write to some of the asset fields that are available for that asset, so that when the asset is created, there is pre-defined information.
In my_asset_edit_fns.inc I am using the processFileUpload() function, and trying to add my extra processing to this. I am sure this is the correct step to take, but I am stuck on how to even set the attributes of fields that have not even been created yet! If they have not been created yet, how is it possible to write info to those fields? Is there some temp that I should write to, and then somehow enter that value after the field is created? Am I missing something there with using the $info array?
I am trying to use:
$asset->setAttrValue('new_attribute', 'My predefined value');
I normally do this, but since this attribute "new_attribute" has not even been created, there is no way to write to is. What is the way for getting around this problem?
Thanks guys, I really appreciate your help in understanding how Matrix asset creation works. I am really starting to get the basics down, and I am loving it!