Extension:DynamicForms
Language: | English |
---|
Dynamic Forms Release status: stable |
|
---|---|
Description | A form is generated as output by considering a text file as an input. |
Author(s) | P.Vamsi Chaithanya, D.Srikanth, A.Jayasree, K.Rajendra prasad, M.Navitha, EnahanceEdu lab, IIIT-Hyderabad |
Last version | 0.1 (2010-09-01) |
MediaWiki | 1.15.1 |
License | No liscense |
Download | DynamicForms |
Check usage (experimental) |
Contents |
[edit] Purpose
Mediawiki doesn’t have a form generator. It has updating the content through raw data but not through forms. This extension helps to bridge that gap through forms. Dynamic Forms is an extension to MediaWiki that allows users to create survey forms, registration forms and all kinds of forms. This extension allows you to have forms for adding, editing and querying data on your wiki, without any programming. Forms can be created and edited not just by administrators, but by users themselves.Generating forms by taking a text file as an input.
[edit] Usage
The main components of this extensions are form definition pages, which exist in a new namespace, 'Form:' and text file. Text file will contain questions or field names and certain syntax to be converted into text fields, text areas and check boxes required for the form. In the Form special page, you can browse and add a text file. This text file will be converted into a form and it will be stored in the database.
This project is helpful to EnhanceEdu lab and possibly to the whole Mediawiki community replacing the google forms and developing separate forms for every survey or registration with Mediawiki forms.
[edit] Installation
[edit] Step 1:
Download the code for Dynamic forms from the following link:
http://enhanceedu.iiit.ac.in/wiki/images/DynamicForms.zip
Extract the zip file and copy that directory in extensions folder.
[edit] Step 2:
You should create the following tables into your wiki database
CREATE TABLE IF NOT EXISTS `answers` (`answerid` int(11) NOT NULL,`answer` text,PRIMARY KEY (`answerid`)) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `answerwiki` ( `answerid` int(11) NOT NULL, `answer` text, PRIMARY KEY (`answerid`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `fields` ( `fieldid` int(11) NOT NULL AUTO_INCREMENT, `fieldname` varchar(25) NOT NULL, PRIMARY KEY (`fieldid`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=48 ;
CREATE TABLE IF NOT EXISTS `files` ( `fileid` int(11) NOT NULL AUTO_INCREMENT, `filename` varchar(255) NOT NULL, PRIMARY KEY (`fileid`), UNIQUE KEY `filename` (`filename`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=19 ;
CREATE TABLE IF NOT EXISTS `form_que_field_option` ( `formque` int(11) NOT NULL AUTO_INCREMENT, `formid` int(11) NOT NULL, `queid` int(11) NOT NULL, `fieldid` int(11) NOT NULL, `optionid` int(11) NOT NULL, PRIMARY KEY (`formque`), KEY `formid` (`formid`), KEY `queid` (`queid`), KEY `fieldid` (`fieldid`), KEY `optionid` (`optionid`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=395 ;
CREATE TABLE IF NOT EXISTS `forms` ( `name_of_form` varchar(25) NOT NULL, `formid` int(11) NOT NULL AUTO_INCREMENT, `description` varchar(255) NOT NULL, PRIMARY KEY (`formid`), UNIQUE KEY `name_of_form` (`name_of_form`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=19 ;
CREATE TABLE IF NOT EXISTS `options` ( `optionid` int(11) NOT NULL AUTO_INCREMENT, `optionname` varchar(255) DEFAULT NULL, PRIMARY KEY (`optionid`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=59 ;
CREATE TABLE IF NOT EXISTS `questions` ( `queid` int(11) NOT NULL AUTO_INCREMENT, `quename` text, PRIMARY KEY (`queid`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=48 ;
CREATE TABLE IF NOT EXISTS `user_que_ans` ( `ins_time` datetime NOT NULL, `userid` int(11) NOT NULL, `formid` int(11) NOT NULL, `queid` int(11) NOT NULL, `answerid` int(11) NOT NULL, PRIMARY KEY (`ins_time`,`userid`,`formid`,`queid`,`answerid`), KEY `userid` (`userid`), KEY `queid` (`queid`), KEY `answerid` (`answerid`), KEY `formid` (`formid`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
[edit] Step 3:
In the file LocalSettings.php in the main MediaWiki directory, add the following lines
- require_once( "$IP/extensions/DynamicForms/ListOfDynamicForms.php" );
- require_once( "$IP/extensions/DynamicForms/DynamicForms.php" );
- require_once( "$IP/extensions/DynamicForms/NewForms.php" );
- require_once( "$IP/extensions/DynamicForms/Displayplugin.php" );
- require_once( "$IP/extensions/DynamicForms/Showplugin.php" );
- require_once( "$IP/extensions/DynamicForms/Answerdisplayplugin.php" );
- require_once( "$IP/extensions/DynamicForms/Finalplugin.php" );
- require_once( "$IP/extensions/DynamicForms/Removeplugin.php" );
- require_once( "$IP/extensions/DynamicForms/Uanswerdisplayplugin.php" );