Form components missing after import (with Webform 5.x-2.3)

tirdadc - January 2, 2009 - 06:39
Project:Node Export
Version:5.x-1.2-alpha1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

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.

#1

danielb - January 3, 2009 - 01:03

Hmm 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.

#2

danielb - March 27, 2009 - 09:28
Status:active» fixed

Fixed 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

#3

tirdadc - April 2, 2009 - 16:06

Great, I'll be sure to test this and get back to you next time I need to use Webforms!

#4

foxtrotcharlie - April 7, 2009 - 16:50

I 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

#5

System Message - April 21, 2009 - 16:50
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.