The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $newpmmsg - Line: 40 - File: global.php(841) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/global.php(841) : eval()'d code 40 errorHandler->error
/global.php 841 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 909 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 909 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5024 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 5024 errorHandler->error
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions.php 5044 is_member
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1370 fetch_forum_permissions
/printthread.php 76 forum_permissions
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Form Tools
Duplicate form with SQL sentence - Printable Version

+- Form Tools (https://forums.formtools.org)
+-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1)
+--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5)
+--- Thread: Duplicate form with SQL sentence (/showthread.php?tid=2748)



Duplicate form with SQL sentence - darioligero - Nov 28th, 2013

Hi,

I have a question. I know that is not good to do this. I'm testing FormTools and I'm trying to duplicate a form from another one with SQL sentences.

I'm doing this:

1-. CREATE TABLE ft_form_13 LIKE ft_form_12;

2-. INSERT ft_form_13 select * from ft_form_12;

3-. INSERT INTO ft_client_forms (`account_id`, `form_id`) VALUES ('4', '13');

4-. INSERT INTO ft_forms (`form_id`, `form_type`, `access_type`, `submission_type`, `is_active`, `is_initialized`, `is_complete`, `is_multi_page_form`, `form_name`, `auto_delete_submission_files`, `submission_strip_tags`, `edit_submission_page_label`, `add_submission_button_label`) VALUES ('13', 'internal', 'public', 'direct', 'yes', 'yes', 'yes', 'no', 'NameOfForm2', 'no', 'yes', 'Edit Submission', '{$LANG.word_add_rightarrow}');



What more sentences I would need to insert, or what tables I would need to update with new information?


Thanks a lot in advance!


RE: Duplicate form with SQL sentence - Joe - Nov 28th, 2013

Dario,

It's easier to duplicate a form with the form backup module: http://modules.formtools.org/form_backup/

Cheers,

Joe


RE: Duplicate form with SQL sentence - darioligero - Nov 28th, 2013

Hello Joe!

Yes, I know this. But I would like to automate it. My intention is to use a job scheduler to automate forms duplication.

FormTools allow me to use it for a lot of IT tasks.


Thanks a lot!

Regards Smile

Dario