0

How can I export forms generated from a Drupal 7 site using webform?

The data is meant to be used to recreate a form generator tool by another team (who is not necessarily using Drupal).

1 Answer 1

0

node export is a first option

it gives

   array(
  (object) array(
      'vid' => '3593',
      'uid' => '1',
      'title' => 'test',
      'log' => '',
      'status' => '1',
      'comment' => '0',
      'promote' => '0',
      'sticky' => '0',
      'vuuid' => '584c561c-cb8c-498e-a4f2-303afcf444be',
      'nid' => '3280',
      'type' => 'webform',
      'language' => 'fr',
      'created' => '1700668763',
      'changed' => '1700670699',
      'tnid' => '0',
      'translate' => '0',
      'uuid' => '806f4462-86b1-4cbd-bebe-478d1efc4894',
      'revision_timestamp' => '1700670699',
      'revision_uid' => '1',
      'field_diffusion' => array(
        'und' => array(
          array(
            'tid' => '36',
          ),
        ),
      ),
      'field_form_header' => array(),
      'field_form_files' => array(),
      'rdf_mapping' => array(
        'rdftype' => array(
          'sioc:Item',
          'foaf:Document',
        ),
        'title' => array(
          'predicates' => array(
            'dc:title',
          ),
        ),
        'created' => array(
          'predicates' => array(
            'dc:date',
            'dc:created',
          ),
          'datatype' => 'xsd:dateTime',
          'callback' => 'date_iso8601',
        ),
        'changed' => array(
          'predicates' => array(
            'dc:modified',
          ),
          'datatype' => 'xsd:dateTime',
          'callback' => 'date_iso8601',
        ),
        'body' => array(
          'predicates' => array(
            'content:encoded',
          ),
        ),
        'uid' => array(
          'predicates' => array(
            'sioc:has_creator',
          ),
          'type' => 'rel',
        ),
        'name' => array(
          'predicates' => array(
            'foaf:name',
          ),
        ),
        'comment_count' => array(
          'predicates' => array(
            'sioc:num_replies',
          ),
          'datatype' => 'xsd:integer',
        ),
        'last_activity' => array(
          'predicates' => array(
            'sioc:last_activity_date',
          ),
          'datatype' => 'xsd:dateTime',
          'callback' => 'date_iso8601',
        ),
      ),
      'path' => array(
        'pid' => '68243',
        'source' => 'node/3280',
        'alias' => 'public/test-0',
        'language' => 'fr',
      ),
      'webform' => array(
        'nid' => '3280',
        'next_serial' => '1',
        'confirmation' => '',
        'confirmation_format' => NULL,
        'redirect_url' => '<confirmation>',
        'status' => '1',
        'block' => '0',
        'allow_draft' => '0',
        'auto_save' => '0',
        'submit_notice' => '1',
        'confidential' => '0',
        'submit_text' => '',
        'submit_limit' => '-1',
        'submit_interval' => '-1',
        'total_submit_limit' => '-1',
        'total_submit_interval' => '-1',
        'progressbar_bar' => '0',
        'progressbar_page_number' => '0',
        'progressbar_percent' => '0',
        'progressbar_pagebreak_labels' => '0',
        'progressbar_include_confirmation' => '0',
        'progressbar_label_first' => 'Début',
        'progressbar_label_confirmation' => 'Terminé',
        'preview' => '0',
        'preview_next_button_label' => '',
        'preview_prev_button_label' => '',
        'preview_title' => '',
        'preview_message' => '',
        'preview_message_format' => NULL,
        'preview_excluded_components' => array(),
        'record_exists' => TRUE,
        'roles' => array(
          '1',
          '2',
        ),
        'emails' => array(),
        'components' => array(
          1 => array(
            'nid' => 3280,
            'cid' => '1',
            'pid' => '0',
            'form_key' => 'select',
            'name' => 'select',
            'type' => 'select',
            'value' => '',
            'extra' => array(
              'items' => "option_1|option 1\r\noption_2|option2",
              'multiple' => 0,
              'title_display' => 'before',
              'description_above' => 0,
              'private' => 0,
              'wrapper_classes' => '',
              'css_classes' => '',
              'aslist' => 0,
              'empty_option' => '',
              'optrand' => 0,
              'other_option' => NULL,
              'other_text' => 'Autre...',
              'description' => '',
              'custom_keys' => FALSE,
              'options_source' => '',
              'analysis' => TRUE,
            ),
            'required' => '0',
            'weight' => '0',
            'page_num' => 1,
          ),
          2 => array(
            'nid' => 3280,
            'cid' => '2',
            'pid' => '0',
            'form_key' => 'texte',
            'name' => 'texte',
            'type' => 'textfield',
            'value' => '',
            'extra' => array(
              'title_display' => 'before',
              'description_above' => 0,
              'private' => 0,
              'wrapper_classes' => '',
              'css_classes' => '',
              'width' => '',
              'maxlength' => '',
              'minlength' => '',
              'field_prefix' => '',
              'field_suffix' => '',
              'disabled' => 0,
              'unique' => 0,
              'description' => '',
              'placeholder' => '',
              'attributes' => array(),
              'analysis' => FALSE,
            ),
            'required' => '0',
            'weight' => '1',
            'page_num' => 1,
          ),
        ),
        'conditionals' => array(
          array(
            'nid' => '3280',
            'rgid' => '0',
            'andor' => NULL,
            'weight' => '-9',
            'rules' => array(
              array(
                'nid' => '3280',
                'rgid' => '0',
                'rid' => '0',
                'source_type' => 'component',
                'source' => '1',
                'operator' => 'equal',
                'value' => 'option_1',
              ),
            ),
            'actions' => array(
              array(
                'nid' => '3280',
                'rgid' => '0',
                'aid' => '0',
                'target_type' => 'component',
                'target' => '2',
                'invert' => '0',
                'action' => 'show',
                'argument' => '',
              ),
            ),
          ),
        ),
      ),
      'name' => 'admin',
      'picture' => '0',
      'data' => 'a:2:{s:7:"overlay";i:1;s:5:"block";a:1:{s:10:"aggregator";a:1:{s:6:"feed-2";i:1;}}}',
      'workbench_access' => array(
        42 => '42',
      ),
      'menu' => NULL,
      'node_export_drupal_version' => '7',
    ),
)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.