The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
![]() |
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 ![]() Dario |