FormTools
From ATI Chennai IT and ITES Wiki
Contents |
Introduction
- FormTools is used to design web forms to acquire data online and view / edit submissions without any coding.
- Here we install FormTools3.0.20-20191109.zip
Install on linux
The following Bash CLI commands have been tested on Debian 64 bit Jessie (8.11) to install FormTools 3.0.20:
cd /var/www/webroot wget -c --no-check-certificate \ "https://formtools.org/download_file.php?file_type=core&file=FormTools3.0.20-20191109.zip" \ -O FormTools3.0.20-20191109.zip unzip FormTools3.0.20-20191109.zip rm FormTools3.0.20-20191109.zip cd formtools chown -R www-data:www-data upload cache # only the folder and not the files and folders within it: chown www-data:www-data global sed -e 's/group\_info\["name"\]/group_info["group_name"]/g' -i global/code/field_types/Dropdown.class.php sed -e 's/group\_info\["name"\]/group_info["group_name"]/g' -i global/code/field_types/MultiSelect.class.php cd themes for d in */ ; do mkdir -p $d/cache; chown www-data:www-data $d/cache; done
The Database commands necessary to be executed prior to installation of FormTools:
CREATE DATABASE `ft3020` CHARACTER SET utf8 COLLATE utf8_unicode_ci; CREATE USER 'ftuser'@'localhost' IDENTIFIED BY 'VerySecretPasword'; GRANT ALTER, ALTER ROUTINE, CREATE, CREATE ROUTINE, CREATE TEMPORARY TABLES, CREATE VIEW, DELETE, DROP, EVENT, EXECUTE, INDEX, INSERT, LOCK TABLES, REFERENCES, SELECT, SHOW VIEW, TRIGGER, UPDATE ON `ft3020`.* TO 'ftuser'@'localhost'; FLUSH PRIVILEGES;
Now install by browsing to:
http://<IP_or_Domain>/<optional_path>/
During installation, the admin user and access password is set.
Post install Fixes
Primary and foreign keys need to be of same types across tables and the Group Fix for Select and Multi Select field types needs to be implemented.
ALTER TABLE ft_field_options CHANGE list_group_id list_group_id MEDIUMINT(9) UNSIGNED NOT NULL, CHANGE option_order option_order SMALLINT(4) UNSIGNED NOT NULL; UPDATE ft_field_types SET edit_field_smarty_markup = '{if $contents == \"\"}\n <div class=\"cf_field_comments\">\n {$LANG.phrase_not_assigned_to_option_list}\n </div>\n{else}\n <select name=\"{$NAME}\">\n {foreach from=$contents.options item=curr_group_info name=group}\n {assign var=group_info value=$curr_group_info.group_info}\n {assign var=options value=$curr_group_info.options}\n {if array_key_exists(\"group_name\", $group_info) && !empty($group_info[\"group_name\"])}\n <optgroup label=\"{$group_info.group_name|escape}\">\n {/if}\n {foreach from=$options item=option name=row}\n <option value=\"{$option.option_value}\"\n {if $VALUE == $option.option_value}selected{/if}>{$option.option_name}</option>\n {/foreach}\n {if array_key_exists(\"group_name\", $group_info) && !empty($group_info[\"group_name\"])}\n </optgroup>\n {/if}\n {/foreach}\n </select>\n{/if}\n{if $comments}\n <div class=\"cf_field_comments\">{$comments}</div>\n{/if}' WHERE field_type_id = '4'; UPDATE ft_field_types SET edit_field_smarty_markup = '{if $contents == \"\"}\n <div class=\"cf_field_comments\">{$LANG.phrase_not_assigned_to_option_list}</div>\n{else}\n {assign var=vals value=\"`$g_multi_val_delimiter`\"|explode:$VALUE}\n <select name=\"{$NAME}[]\" multiple size=\"{if $num_rows}{$num_rows}{else}5{/if}\">\n {foreach from=$contents.options item=curr_group_info name=group}\n {assign var=group_info value=$curr_group_info.group_info}\n {assign var=options value=$curr_group_info.options}\n {if array_key_exists(\"group_name\", $group_info) && !empty($group_info[\"group_name\"])}\n <optgroup label=\"{$group_info.group_name|escape}\">\n {/if}\n {foreach from=$options item=option name=row}\n <option value=\"{$option.option_value}\" {if $option.option_value|in_array:$vals}selected{/if}>{$option.option_name}</option>\n {/foreach}\n {if array_key_exists(\"group_name\", $group_info) && !empty($group_info[\"group_name\"])}\n </optgroup>\n {/if}\n {/foreach}\n </select>\n{/if}\n\n{if $comments}\n <div class=\"cf_field_comments\">{$comments}</div>\n{/if}' WHERE field_type_id = '5';
Screenshots
Install Screenshots:
- Select Install Language
- System Check
- Create DB Tables
- Create Config file - located at <FormToolsWebroot>/global/config.php
- Create Admin Account
- Installed
- Upgrade status
Running Screenshots: