Component : ArtForms v.2.1b7.2 [For Joomla 1.5] - Build 107
This version has a few issues i.e. blank page after submitting form, form not saved to the database. Thanks to mic p., here's the solution.
But, to store the forms into the database you have to edit 2 scripts.
1. ../components/com_artforms/artforms.html.php and search for:
saveDBForms( $database, $option, $itemname_todb, $itemdata_todb, $formtitle, $formid );
(around line 545) and DELETE the $database.
The call looks now: saveDBForms( $option, $itemname_todb, $itemdata_todb, $formtitle, $formid );
2. ../administrator/components/com_artforms/lib/af.lib.afforms.php and search for:
function saveDBForms( &$db, $option, $name, $data, $formtitle, $formid ) {
(around line 156) and DELETE here the &$db
The line looks now like: function saveDBForms( $option, $name, $data, $formtitle, $formid ) {
Finally ADD after this function this:
$db =& JFactory::getDBO();
The whole looks now like this:
function saveDBForms( $option, $name, $data, $formtitle, $formid ) {
require_once( AFPATH_ADM_SITE.'artforms.class.php' );
$db =& JFactory::getDBO();
Last action is to delete this: $row->_tbl_key = "id"; (same function, 16 lines below right BEFORE if (!$row->store()) {
Now the forms are stored into the database.
Here's the original post click here.
SITE NOTE: To display the HTML tags on JoomlaFAQs, there is a space between the name of the tags and the enclosing "less than" (<) and "more than" (>) brackets. If you copy the code, make sure you delete the spaces to make it work!
If you have found this site to be useful and has helped you, kindly consider to donate. Your donation will encourage me and help to upkeep JoomlaFAQs.org! Cheers!
Add comment