PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

fill in list from a csv file in another part of the form

  1. Is it possible to fill in a list with items from a csv file which is inputted in another form or earlier stage of the same form. So in step 1 the user chooses the file and in step 2, the entries of the file show up in list form for editing or adding.

    any pointer appreciated.

    regards,
    Nilay.

    Posted 12 years ago on Wednesday April 25, 2012 | Permalink
  2. David Peralty

    It is an interesting problem that is potentially possible, but not through the same form as the file isn't really uploaded until the entire form is submitted. You would have to have a file upload form and then a processing/editing form.

    You would want to send the file name to the second form (confirmation redirect with pass data via query string) and have the second form pull in the file details in a special function and then process it in the way you want before pre-rendering certain form fields with the relevant data.

    http://php.net/manual/en/function.str-getcsv.php
    http://www.gravityhelp.com/documentation/page/Gform_pre_render

    Hope this helps.

    Posted 12 years ago on Wednesday April 25, 2012 | Permalink
  3. Hi David,
    coming back on this issue again. I have implemented the connection between file selection and passing that info to the next sheet which will show the data.

    Now the tough part of parsing csv and showing all elements as a list:

    Example:(.csv)

    Name Emai l MobileNumber
    -------------------------------------------------------
    A a@b.c 0789928202 <------list row 1
    B b@b.c 0799002893 <-----list row 2
    C c@b.c 0767899020 <-----list row 3

    and so on....

    All these three entries should end up in a list format in gravity forms as shown above.
    So it this dynamic list creation possible...I guess so...but an example would be handy.

    thanks for help,

    regards,
    Niilay.

    Posted 11 years ago on Sunday April 29, 2012 | Permalink