Closed (fixed)
Project:
Node export
Version:
5.x-1.2-alpha1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Jan 2009 at 06:39 UTC
Updated:
21 Apr 2009 at 16:50 UTC
After importing a webform, all of its form components are missing. When taking a closer look at the code generated by the export, I noticed this:
...
'webform' =>
array (
'nid' => '11073',
'confirmation' => '<p>Thank you. Your Form has been submitted.</p>',
'teaser' => '0',
'submit_text' => '',
'submit_limit' => '-1',
'submit_interval' => '-1',
'email' => '',
'email_from_name' => 'default',
'email_from_address' => 'default',
'email_subject' => 'default',
'additional_validate' => '',
'additional_submit' => '',
'roles' =>
array (
0 => '1',
1 => '2',
2 => '3',
),
'components' =>
array (
1 =>
array (
'nid' => '11073',
'cid' => '1',
'form_key' => 'first_name',
'name' => 'First Name',
'type' => 'textfield',
'value' => '',
'extra' =>
array (
'width' => '',
'maxlength' => '',
'field_prefix' => '',
'field_suffix' => '',
'disabled' => 0,
'description' => '',
'attributes' =>
array (
),
),
'mandatory' => '1',
'email' => '1',
'pid' => '0',
'weight' => '0',
'page_num' => 1,
),
...It doesn't seem right for the export to be mentioning the original nid for the form components, given that the nid for the resulting webform will not be the same. Any idea on how to get this to work? Recreating webforms by hand is dull as hell.
Comments
Comment #1
danielb commentedHmm I never had this problem - but it has been a long time since I used the version 5 of this module. But webforms is exactly what I made it for. Which version of webform? I bet it's the new one and they've changed something. I'll check it out soon.
Comment #2
danielb commentedFixed in latest version with a caveat; you must use the 'save and edit' configuration for webform nodes.
I don't see any way to fix it in the 'prepopulate' mode. Well I do, but it involves storing the components in the database or in a cookie until the form is submitted.
Just use the save and edit option :P
Comment #3
tirdadc commentedGreat, I'll be sure to test this and get back to you next time I need to use Webforms!
Comment #4
foxtrotcharlie commentedI just tested it, and it and the importing of a webform does indeed work correctly if you change the "Method to use when importing a node: " at admin/settings/export to "Save as a new node then edit".
Thanks :-)
www.parkroad.co.za