<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><BR><DIV><DIV>On 31 May 2007, at 8:31 PM, Mark Fredrickson wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">Unfortunantely, a lot of the CCK field adding, updating, removing, etc</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">is tied up in form submission right now. In fact, the</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">content_copy.module import is basically just mocking up drupal forms</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">and submitting them programmatically. This is not to say a CRUD API</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">couldn't be written, just that I've been down that road before, and I</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">it wasn't fruitful. :-(</FONT></P> </BLOCKQUOTE></DIV><BR><DIV>So? export the default_values of the form array structure to the $module_content_fields($type) function.</DIV><DIV>I bet fquery could really useful for this.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>And instead of doing that code in the install profile, by hand, you just enable the module. Which has it's own</DIV><DIV>.install which just recurs through the exported data in the $module_content_fields($type) hook, for each </DIV><DIV>$type that the module defines.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Ideally we'd need to hook into the forms for the validation and especially the code that creates the tables any way.</DIV></BODY></HTML>