@@ -23,7 +23,7 @@ public function __construct($language, $forms_language, $pages, $user, $navigati
23
23
24
24
$ name = 'Forms ' ;
25
25
$ author = '<a href="https://partydragen.com" target="_blank" rel="nofollow noopener">Partydragen</a> ' ;
26
- $ module_version = '1.10.2 ' ;
26
+ $ module_version = '1.10.3 ' ;
27
27
$ nameless_version = '2.0.1 ' ;
28
28
29
29
parent ::__construct ($ this , $ name , $ author , $ module_version , $ nameless_version );
@@ -442,6 +442,16 @@ private function initialiseUpdate($old_version) {
442
442
echo $ e ->getMessage () . '<br /> ' ;
443
443
}
444
444
}
445
+
446
+ if ($ old_version < 1103 ) {
447
+ try {
448
+ $ this ->_db ->query ('ALTER TABLE nl2_forms_fields ADD `regex` varchar(64) DEFAULT NULL ' );
449
+ $ this ->_db ->query ('ALTER TABLE nl2_forms_fields ADD `default_value` varchar(64) NOT NULL DEFAULT \'\'' );
450
+ } catch (Exception $ e ) {
451
+ // unable to retrieve from config
452
+ echo $ e ->getMessage () . '<br /> ' ;
453
+ }
454
+ }
445
455
}
446
456
447
457
private function initialise () {
@@ -501,7 +511,7 @@ private function initialise() {
501
511
502
512
if (!$ this ->_db ->showTables ('forms_fields ' )) {
503
513
try {
504
- $ this ->_db ->createTable ("forms_fields " , " `id` int(11) NOT NULL AUTO_INCREMENT, `form_id` int(11) NOT NULL, `name` varchar(255) NOT NULL, `type` int(11) NOT NULL, `required` tinyint(1) NOT NULL DEFAULT '0', `min` int(11) NOT NULL DEFAULT '0', `max` int(11) NOT NULL DEFAULT '0', `placeholder` varchar(255) NULL DEFAULT NULL, `options` text NULL, `info` text NULL, `deleted` tinyint(1) NOT NULL DEFAULT '0', `order` int(11) NOT NULL DEFAULT '1', PRIMARY KEY (`id`) " );
514
+ $ this ->_db ->createTable ("forms_fields " , " `id` int(11) NOT NULL AUTO_INCREMENT, `form_id` int(11) NOT NULL, `name` varchar(255) NOT NULL, `type` int(11) NOT NULL, `required` tinyint(1) NOT NULL DEFAULT '0', `min` int(11) NOT NULL DEFAULT '0', `max` int(11) NOT NULL DEFAULT '0', `placeholder` varchar(255) NULL DEFAULT NULL, `options` text NULL, `info` text NULL, `regex` varchar(64) DEFAULT NULL, `default_value` varchar(64) NOT NULL DEFAULT '', ` deleted` tinyint(1) NOT NULL DEFAULT '0', `order` int(11) NOT NULL DEFAULT '1', PRIMARY KEY (`id`) " );
505
515
506
516
$ this ->_db ->insert ('forms_fields ' , array (
507
517
'form_id ' => 1 ,
0 commit comments