This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 2

Duplicate Form with the data


  1. raj000
    Member

    Hi,

    Is there a way to duplicate a form along with the underlying data? I guess I will have to manually duplicate some database tables and make some code changes.

    Thanks in advance.

    Posted 15 years ago #
  2. yuniar

    Yes, this one is pretty simple.
    Edit your manage_form.php, search around line 310 and you'll find this code:

    //create the new table
    do_query("create table ap_form_{$new_form_id} like ap_form_{$form_id}");

    right below that code, add this code:

    do_query("insert into ap_form_{$new_form_id}
     select * from ap_form_{$form_id}");

    that should do it.


    MachForm Founder

    Posted 15 years ago #
  3. raj000
    Member

    Thanks for your reply.

    So I just make the above changes and thats it? I dont have to manually copy any database tables, it will do whatever is required on its own?

    Posted 15 years ago #
  4. raj000
    Member

    ahhhh..worked brilliantly...thanks

    Posted 15 years ago #

RSS feed for this topic

Reply