<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV>Have you added this line to your form?</DIV><DIV>$form['#attributes']['enctype'] = 'multipart/form-data';</DIV><BR><DIV><DIV>On Nov 14, 2007, at 5:18 PM, Isaac Simon Hodes wrote:</DIV><BLOCKQUOTE type="cite"><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV class="Section1"><P class="MsoNormal"><FONT size="2" face="Arial"><SPAN style="font-size:10.0pt; font-family:Arial; font-size: 13.3333px; "><SPAN class="Apple-style-span" style="font-family: Arial; font-size: 13.3333px; ">Hello, I’m new to the forms API and hoping for some advice. I am creating a multistep form in 5.3. The form uses drupal_execute to generate new CCK nodes. The basic form is working, but I cannot figure out how to make drupal_execute attach files to the new nodes as it creates them.</SPAN><O:P style="font-family: Arial; font-size: 13.3333px; "></O:P></SPAN></FONT></P><P class="MsoNormal"><FONT size="2" face="Arial"><SPAN style="font-size:10.0pt; font-family:Arial; font-size: 13.3333px; "><O:P style="font-family: Arial; font-size: 13.3333px; "><SPAN class="Apple-style-span" style="font-family: Arial; font-size: 13.3333px; "> </SPAN></O:P></SPAN></FONT></P><P class="MsoNormal"><FONT size="2" face="Arial"><SPAN style="font-size:10.0pt; font-family:Arial; font-size: 13.3333px; "><SPAN class="Apple-style-span" style="font-family: Arial; font-size: 13.3333px; ">I would like to simply pass a form value to the CCK node form (through drupal_execute) along with the other necessary fields. E.g. something along the lines of</SPAN><BR style="font-family: Arial; font-size: 13.3333px; "><BR style="font-family: Arial; font-size: 13.3333px; "><O:P style="font-family: Arial; font-size: 13.3333px; "></O:P></SPAN></FONT></P><P class="MsoNormal"><FONT size="2" face="Arial"><SPAN style="font-size:10.0pt; font-family:Arial; font-size: 13.3333px; "><SPAN class="Apple-style-span" style="font-family: Arial; font-size: 13.3333px; ">$values['file']['field_object_file_upload'][0] = $form_values[‘my_form_file_upload_field’];</SPAN><O:P style="font-family: Arial; font-size: 13.3333px; "></O:P></SPAN></FONT></P><P class="MsoNormal"><FONT size="2" face="Arial"><SPAN style="font-size:10.0pt; font-family:Arial; font-size: 13.3333px; "><O:P style="font-family: Arial; font-size: 13.3333px; "><SPAN class="Apple-style-span" style="font-family: Arial; font-size: 13.3333px; "> </SPAN></O:P></SPAN></FONT></P><P class="MsoNormal"><FONT size="2" face="Arial"><SPAN style="font-size:10.0pt; font-family:Arial; font-size: 13.3333px; "><SPAN class="Apple-style-span" style="font-family: Arial; font-size: 13.3333px; ">Solutions involving either upload module or a CCK file field would be fine.</SPAN><O:P style="font-family: Arial; font-size: 13.3333px; "></O:P></SPAN></FONT></P><P class="MsoNormal"><FONT size="2" face="Arial"><SPAN style="font-size:10.0pt; font-family:Arial; font-size: 13.3333px; "><O:P style="font-family: Arial; font-size: 13.3333px; "><SPAN class="Apple-style-span" style="font-family: Arial; font-size: 13.3333px; "> </SPAN></O:P></SPAN></FONT></P><P class="MsoNormal"><FONT size="2" face="Arial"><SPAN style="font-size:10.0pt; font-family:Arial; font-size: 13.3333px; "><SPAN class="Apple-style-span" style="font-family: Arial; font-size: 13.3333px; ">Does anyone have advice? (I hope this is an appropriate question for the “development” list. Based on the descriptions at lists.drupal.org that seems to be the case; if not, please let me know where I should post it.) Thanks for your help!</SPAN></SPAN></FONT></P></DIV></SPAN></BLOCKQUOTE></DIV></BODY></HTML>