Multi form importing...

Permalink Browser Info Environment
Hi, I'm hoping this is something obvious i'm missing... basically i need to be able to import mass form submissions into the system, and doing them all individually would take an age, we are talking 1000's.

So I have made a new 'proforms_display' block called 'proforms_import', I have then use it to pull in a CSV and create an array of all the values that need importing, so the array looks something like this:

    [0] => Array
            [bID] => 55
            [question_set] => 3
            [date_of_reading] => 2006-02-13 00:00:00
            [meter_reading] => 16282
            [type_of_reading] => 1
            [enter_reading] => 
            [meter_type] => Water
            [meter_name] => Garage
            [meter_number] => 0124569
            [associated_user] => 1
            [associated_page] => 183

I them have created a foreach for the array to create individual forms for each and entry to pass through the ajax and into the system:

<?php foreach ($readings as $reading) { ?>
<form name="proforms_form_<?php   echo $bID?>_<?php   echo $readingNo?>" class="ccm-ui proform_slider form_readings" id="proforms_form_<?php   echo $bID?>_<?php   echo $readingNo?>" method="post" action="<?php   echo $this->action('entry_form_multipart')?>" enctype="multipart/form-data">
  <input type="hidden" name="bID" value="<?php   echo $bID?>"/>
  <input type="hidden" name="question_set" value="<?php   echo $question_set?>"/>
  <?php    echo $fm->hidden('multipart',1);?>
  <input type="hidden" id="akID_52__value_" name="akID[52][value]" class="ccm-input-hidden" value="<?php   echo $reading['date_of_reading'] ?>">
  <input type="hidden" name="akID[54][atRadioOptionID][]" id="akID[54][atRadioOptionID][]<?php   echo $reading['type_of_reading'] ?>" value="<?php   echo $reading['type_of_reading'] ?>" class="ccm-input-hidden">
  <input type="hidden" id="akID[89][value]" name="akID[89][value]" value="<?php   echo $reading['meter_reading'] ?>" class="ccm-input-hidden">
  <input type="hidden" name="akID[84][value]" id="akID[84][value]" value="<?php   echo $reading['meter_type'] ?>" class="ccm-input-hidden">
  <input type="hidden" name="akID[85][value]" id="akID[85][value]" value="<?php   echo $reading['meter_name'] ?>" class="ccm-input-hidden">
  <input type="hidden" name="akID[86][value]" id="akID[86][value]" value="<?php   echo $reading['meter_number'] ?>" class="ccm-input-hidden">
  <input type="hidden" name="akID[87][value]" id="akID[87][value]" value="<?php   echo $reading['associated_user'] ?>" class="ccm-input-hidden">
  <input type="hidden" name="akID[88][value]" id="akID[88][value]" value="<?php   echo $reading['associated_page'] ?>" class="ccm-input-hidden">
  <input type="hidden" name="no_captcha" id="no_captcha" value="1" class="ccm-input-hidden">
<div class="proforms_submit_group">

How do I get it to loop through submitting each form and then submit the next on on success automatically?

I know this is a little wide, but help would be really appreciated... or is there a way I can just pass the array through the controller?



Type: Discussion
Status: In Progress
View Replies:
RadiantWeb replied on at Permalink Reply
Hi there,

This is an auto responder to let you know that your support ticket has been forwarded to our entire support team at RadiantWeb!

Support tickets are reviewed Mondays thru Fridays 9am to 9pm & Saturdays 9am to 12pm EST.

A support team member will be following up with you as soon as possible.

Thank for supporting RadiantWeb Products!

RadiantWeb Support
BHWW replied on at Permalink Reply
Hi so if this won't work is there any way to import multiple entries into the form results? Looking at the Advanced Forms add-on, i seem to be able to do it with that, but there are pros and cons to both systems.

Please advise.

concrete5 Environment Information

# concrete5 Version

# concrete5 Packages
Lerteco User Importer (2.1.1), Multi Page Selector Attribute (0.9.2), Page Selector Attribute (1.1), Pro Forms (7.5.6), User Selector Attributes (1.1).

# concrete5 Overrides
blocks/proforms_display, blocks/proforms_import, blocks/proforms_import-v1, blocks/proforms_import-v2, blocks/proforms_list, languages/ar, languages/cs_CZ, languages/da_DK, languages/de_DE, languages/el_GR, languages/es_AR, languages/es_ES, languages/es_MX, languages/es_PE, languages/fa_IR, languages/fi_FI, languages/fr_FR, languages/it_IT, languages/ja_JP, languages/nb_NO, languages/nl_NL, languages/pt_PT, languages/ro_RO, languages/ru_RU, languages/sk_SK, languages/sl_SI, languages/sv_SE, languages/tr_TR, languages/vi_VN, languages/zh_TW, models/attribute, themes/plain

# concrete5 Cache Settings
Block Cache - Off
Overrides Cache - Off
Full Page Caching - Off

# Server Software

# Server API

# PHP Version

# PHP Extensions
apache2handler, bcmath, bz2, calendar, Core, ctype, curl, date, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, imap, intl, json, ldap, libxml, mbstring, mcrypt, mysql, mysqli, openssl, pcre, PDO, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, Reflection, session, SimpleXML, soap, sockets, SPL, sqlite3, standard, tokenizer, wddx, xml, xmlreader, xmlwriter, xsl, yaz, zip, zlib.

# PHP Settings
max_execution_time - 30
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 1000
memory_limit - 128M
post_max_size - 32M
sql.safe_mode - Off
upload_max_filesize - 32M
ldap.max_links - Unlimited
mysql.max_links - Unlimited
mysql.max_persistent - Unlimited
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
pgsql.max_links - Unlimited
pgsql.max_persistent - Unlimited
session.cache_limiter - nocache
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5

Browser User-Agent String

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/600.1.17 (KHTML, like Gecko) Version/7.1 Safari/537.85.10

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You may not request a refund that is not currently owned by you.