who can give this sample, backup file, because i not everything understand about two tables:
How can I use the Multiplier in CFv5?
Saving the data to a database table
You will probably want to use two tables to save this data. One main one for the form data that is not in the multi field array and a second one for the multi-field records. You will need to link the two together by saving the main data first, then getting the Primary Key of that record - usually the id or cf_id - that ChronoForms will have added to the $form->data array. Add this to the mult-field data and use a second DB Save action with 'Multi save' and 'Save under model id' set to yes.
How can I use the Multiplier in CFv5?
Saving the data to a database table
You will probably want to use two tables to save this data. One main one for the form data that is not in the multi field array and a second one for the multi-field records. You will need to link the two together by saving the main data first, then getting the Primary Key of that record - usually the id or cf_id - that ChronoForms will have added to the $form->data array. Add this to the mult-field data and use a second DB Save action with 'Multi save' and 'Save under model id' set to yes.
Hi Raimis,
Please add the first DB Save to your form, then add a Debugger action after that; submit the form and copy and paste the Debugger output here.
Bob
Please add the first DB Save to your form, then add a Debugger action after that; submit the form and copy and paste the Debugger output here.
Bob
Debugger:
Data Array
Array
(
[option] => com_chronoforms5
[chronoform] => UserBase
[event] => submit
[userID] => 831
[PersonalFirstName] => name
[PersonalSurname] => Surname
[PersonalDateOfBirth] => 2015-10-06
[PersonalPlaceOfBirth] => kazkur
[PersonalHomeAddress] => Home Address
[PersonalTelephoneNo] => 123
[PersonalNationality] => 1
[PersonalNoOfChildren] => 5
[PersonalNextOfKin] => Next of Kin
[PersonalNameOfNextOfKin] => Name of Next of Kin
[PersonalAddressNextOfKin] => Next of Kin
This field is
[PersonalNameOfKinTelephoneNo] =>
[PersonalHeight] => 123
[PersonalWeight] => 52
[PersonalColorOfEyes] => red
[PersonalColorOfHair] => blue
[PersonalOverallSize] => 123
[PersonalShoeSize] => 123
[PersonalNearestAirport] => arti
[PersonalLanguages] => PersonalGerman
[TravelDocumentPassportNo] => 123456
[TravelDocumentPassportPlaceOfIssue] => kazkur
[TravelDocumentPassportDateOfIssue] => 2015-10-01
[TravelDocumentPassportDateOfExpire] => 2015-10-30
[TravelDocumentSeamansBook] => Seaman
[TravelDocumentSeamansPlaceOfIssue] => kazkur
[TravelDocumentSeamansDateOfIssue] => 01-10-2015
[TravelDocumentSeamansDateOfExpire] => 31-10-2015
[TravelDocNo] => ttravel123
[TravelDocPlaceOfIssue] => travel
[TravelDocDateOfIssue] => 2015-10-01
[TravelDocDateOfExpire] => 2015-10-31
[TravelDocUsVisaNumber] =>
[TravelDocUsVisaNumberPlaceOfIssue] =>
[TravelDocUsVisaNumberDateOfIssue] =>
[TravelDocUsVisaNumberDateOfExpire] =>
[CertificateNationalLicenseGrade] => National License3
[CertificateLicenseNumber] => 456789
[CertificatePlaceOfIssue] => lizence
[CertificateDateOfIssue] => 2015-10-20
[FlagStateSeamansBooksNationality] =>
[FlagStateSeamansBooksNumber] =>
[FlagStateSeamansBooksDateOfIssue] =>
[FlagStateSeamansBooksExpire] =>
[EndorsementsNationality] =>
[EndorsementsGrade] =>
[EndorsementsNumber] =>
[EndorsementsPlaceOfIssue] =>
[EndorsementsDateOfIssue] =>
[EndorsementsDateOfExpire] =>
[MedicalExaminationPlaceOfIssue] =>
[MedicalExaminationDateOfIssue] =>
[MedicalExaminationDateOfExpire] =>
[VaccinationName] =>
[SeaServicesNameOfVessel] =>
[SeaServicesTypeOfVessel] =>
[SeaServicesFlag] =>
[SeaServicesDWT] =>
[SeaServicesTypeOfMeKw] =>
[SeaServicesPositionOnBoard] =>
[SeaServicesSignOn] =>
[SeaServicesSignOff] =>
[SeaServicesCompanysNameContactPhoneNumber] =>
[SaveForm] => Save form
[cf_id] => 5
)
Array
(
)
Errors
Array
(
)
Debug Info
Array
(
[4] => Array
(
[DB Save] => Array
(
[Queries] => Array
(
[0] => INSERT INTO `jos_cf_UserBase` (`PersonalFirstName`, `PersonalSurname`, `PersonalDateOfBirth`, `PersonalPlaceOfBirth`, `PersonalHomeAddress`, `PersonalTelephoneNo`, `PersonalNationality`, `PersonalNoOfChildren`, `PersonalNextOfKin`, `PersonalNameOfNextOfKin`, `PersonalAddressNextOfKin`, `PersonalNameOfKinTelephoneNo`, `PersonalHeight`, `PersonalWeight`, `PersonalColorOfEyes`, `PersonalColorOfHair`, `PersonalOverallSize`, `PersonalShoeSize`, `PersonalNearestAirport`, `PersonalLanguages`, `TravelDocumentPassportNo`, `TravelDocumentPassportPlaceOfIssue`, `TravelDocumentPassportDateOfIssue`, `TravelDocumentPassportDateOfExpire`, `TravelDocumentSeamansBook`, `TravelDocumentSeamansPlaceOfIssue`, `TravelDocumentSeamansDateOfIssue`, `TravelDocumentSeamansDateOfExpire`, `TravelDocNo`, `TravelDocPlaceOfIssue`, `TravelDocDateOfIssue`, `TravelDocDateOfExpire`, `TravelDocUsVisaNumber`, `TravelDocUsVisaNumberPlaceOfIssue`, `TravelDocUsVisaNumberDateOfIssue`, `TravelDocUsVisaNumberDateOfExpire`, `CertificateNationalLicenseGrade`, `CertificateLicenseNumber`, `CertificatePlaceOfIssue`, `CertificateDateOfIssue`, `FlagStateSeamansBooksNationality`, `FlagStateSeamansBooksNumber`, `FlagStateSeamansBooksDateOfIssue`, `FlagStateSeamansBooksExpire`, `EndorsementsNationality`, `EndorsementsGrade`, `EndorsementsNumber`, `EndorsementsPlaceOfIssue`, `EndorsementsDateOfIssue`, `EndorsementsDateOfExpire`, `MedicalExaminationPlaceOfIssue`, `MedicalExaminationDateOfIssue`, `MedicalExaminationDateOfExpire`, `VaccinationName`, `SeaServicesNameOfVessel`, `SeaServicesTypeOfVessel`, `SeaServicesFlag`, `SeaServicesDWT`, `SeaServicesTypeOfMeKw`, `SeaServicesPositionOnBoard`, `SeaServicesSignOn`, `SeaServicesSignOff`, `SeaServicesCompanysNameContactPhoneNumber`, `user_id`, `uniq_id`, `created`) values ('name', 'Surname ', '2015-10-06', 'kazkur', 'Home Address ', '123', '1', '5', 'Next of Kin', 'Name of Next of Kin', 'Next of Kin
This field is ', '', '123', '52', 'red', 'blue', '123', '123', 'arti', 'PersonalGerman', '123456', 'kazkur', '2015-10-01', '2015-10-30', 'Seaman', 'kazkur', '01-10-2015', '31-10-2015', 'ttravel123', 'travel', '2015-10-01', '2015-10-31', '', '', '', '', 'National License3', '456789', 'lizence', '2015-10-20', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '831', 'b5f99a2ae7e2269ed6eda97dbc059f28e97de13e', '2015-10-09 08:11:57');
)
)
)
)
Hi Raimis,
You can see that the main record is saved with [cf_id] => 5 so that is now available to be used in $form->data['cf_id']
BUT the multiplier data is not showing correctly, only the last entry is there
Bob
You can see that the main record is saved with [cf_id] => 5 so that is now available to be used in $form->data['cf_id']
BUT the multiplier data is not showing correctly, only the last entry is there
[CertificateNationalLicenseGrade] => National License3
[CertificateLicenseNumber] => 456789
[CertificatePlaceOfIssue] => lizence
[CertificateDateOfIssue] => 2015-10-20
This suggests that you don't have array names set for the multiplier items. Please check the FAQs again to fix that.
Bob
[CertificateNationalLicenseGrade] => Array
(
[__N__] =>
[1] => License 2
[2] => License 3
)
[CertificateLicenseNumber] => Array
(
[__N__] =>
[1] => 456
[2] => 789
)
[CertificatePlaceOfIssue] => Array
(
[__N__] =>
[1] => 456
[2] => 789
)
[CertificateDateOfIssue] => Array
(
[__N__] =>
[1] => 2015-10-06
[2] => 2015-10-05
)
but now in database these fields is empty
Hi Raimis,
As you can see that still isn't very useful. What settings have you used for the Multiplier and the elements in it?
Bob
As you can see that still isn't very useful. What settings have you used for the Multiplier and the elements in it?
Bob
if in first "DB save" check "Multi save: No" getting DB errors, if "Multi save: Yes" in these fields "CertificateNationalLicenseGrade", "CertificateLicenseNumber" and etc. is emty in DB
Hi Raimis,
What settings have you used for the Multiplier and the elements in it?
Bob
What settings have you used for the Multiplier and the elements in it?
Bob
Multiplier:
Replacer: Replacer
Counter: 1
Hide Firs: Yes
Disable firs: No
Hide buttons: No
Start count:
Data path:
elements:
multi fields:
Field Name, Fields ID: CertificateNationalLicenseGrade[__N__]
Field Name, Fields ID: OtherField1[__N__]
Field Name, Fields ID: OtherField2[__N__]
Replacer: Replacer
Counter: 1
Hide Firs: Yes
Disable firs: No
Hide buttons: No
Start count:
Data path:
elements:
multi fields:
Field Name, Fields ID: CertificateNationalLicenseGrade[__N__]
Field Name, Fields ID: OtherField1[__N__]
Field Name, Fields ID: OtherField2[__N__]
Hi Raimis.
Please set the Replacer to __N__, not to Replacer.
Please see the section on Setting element names and Ids in this FAQ (though note that the FAQ uses ## as a Replacer).
I suggest that you use names and ids like this (name / id)
certificate[__N__][NationalLicenseGrade] / certificate___N___NationalLicenseGrade
certificate[__N__][LicenceNumber] / certificate___N___LicenceNumber
certificate[__N__][PlaceOfIssue] / certificate___N___PlaceOfIssue
certificate[__N__][DateOfIssue] / certificate___N___DateOfIssue
Bob
Please set the Replacer to __N__, not to Replacer.
Please see the section on Setting element names and Ids in this FAQ (though note that the FAQ uses ## as a Replacer).
I suggest that you use names and ids like this (name / id)
certificate[__N__][NationalLicenseGrade] / certificate___N___NationalLicenseGrade
certificate[__N__][LicenceNumber] / certificate___N___LicenceNumber
certificate[__N__][PlaceOfIssue] / certificate___N___PlaceOfIssue
certificate[__N__][DateOfIssue] / certificate___N___DateOfIssue
Bob
Hi Raimis.
Please set the Replacer to __N__, not to Replacer.
Please see the section on Setting element names and Ids in this FAQ (though note that the FAQ uses ## as a Replacer).
I suggest that you use names and ids like this (name / id)
certificate[__N__][NationalLicenseGrade] / certificate___N___NationalLicenseGrade
certificate[__N__][LicenceNumber] / certificate___N___LicenceNumber
certificate[__N__][PlaceOfIssue] / certificate___N___PlaceOfIssue
certificate[__N__][DateOfIssue] / certificate___N___DateOfIssue
Bob
Please set the Replacer to __N__, not to Replacer.
Please see the section on Setting element names and Ids in this FAQ (though note that the FAQ uses ## as a Replacer).
I suggest that you use names and ids like this (name / id)
certificate[__N__][NationalLicenseGrade] / certificate___N___NationalLicenseGrade
certificate[__N__][LicenceNumber] / certificate___N___LicenceNumber
certificate[__N__][PlaceOfIssue] / certificate___N___PlaceOfIssue
certificate[__N__][DateOfIssue] / certificate___N___DateOfIssue
Bob
Debug
and attached my form, when downloading form, please delete from here.
Data Array
Array
(
[option] => com_chronoforms5
[chronoform] => UserBase
[event] => submit
[userID] => 831
[PersonalFirstName] => name
[PersonalSurname] => Surname
[PersonalDateOfBirth] => 2015-10-28
[PersonalPlaceOfBirth] => kazkur
[PersonalHomeAddress] => asdasdasd
[PersonalTelephoneNo] => 45645645
[PersonalNationality] => 0
[PersonalNoOfChildren] => 5
[PersonalNextOfKin] => Next of Kin
[PersonalNameOfNextOfKin] => Name of Next of Kin
[PersonalAddressNextOfKin] => asdadasd
[PersonalNameOfKinTelephoneNo] =>
[PersonalHeight] => 123
[PersonalWeight] => 52
[PersonalColorOfEyes] => asd
[PersonalColorOfHair] => blue
[PersonalOverallSize] => asdas
[PersonalShoeSize] => dasd
[PersonalNearestAirport] => arti
[PersonalLanguages] => PersonalEnglish
[TravelDocumentPassportNo] => 123456
[TravelDocumentPassportPlaceOfIssue] => kazkur
[TravelDocumentPassportDateOfIssue] => 2015-10-13
[TravelDocumentPassportDateOfExpire] => 2015-10-31
[TravelDocumentSeamansBook] => Seaman
[TravelDocumentSeamansPlaceOfIssue] => kazkur
[TravelDocumentSeamansDateOfIssue] => 27-10-2015
[TravelDocumentSeamansDateOfExpire] => 27-10-2015
[TravelDocNo] => ttravel123
[TravelDocPlaceOfIssue] => asdas
[TravelDocDateOfIssue] => 2015-10-20
[TravelDocDateOfExpire] => 2015-10-29
[TravelDocUsVisaNumber] =>
[TravelDocUsVisaNumberPlaceOfIssue] =>
[TravelDocUsVisaNumberDateOfIssue] =>
[TravelDocUsVisaNumberDateOfExpire] =>
[Certificate] => Array
(
[__N__] => Array
(
[NationalLicenseGrade] => license 3
[LicenseNumber] => 789
[PlaceOfIssue] => zxc
[DateOfIssue] => 13-10-2015
)
)
[FlagStateSeamansBooksNationality] =>
[FlagStateSeamansBooksNumber] =>
[FlagStateSeamansBooksDateOfIssue] =>
[FlagStateSeamansBooksExpire] =>
[EndorsementsNationality] =>
[EndorsementsGrade] =>
[EndorsementsNumber] =>
[EndorsementsPlaceOfIssue] =>
[EndorsementsDateOfIssue] =>
[EndorsementsDateOfExpire] =>
[MedicalExaminationPlaceOfIssue] =>
[MedicalExaminationDateOfIssue] =>
[MedicalExaminationDateOfExpire] =>
[VaccinationName] =>
[SeaServicesNameOfVessel] =>
[SeaServicesTypeOfVessel] =>
[SeaServicesFlag] =>
[SeaServicesDWT] =>
[SeaServicesTypeOfMeKw] =>
[SeaServicesPositionOnBoard] =>
[SeaServicesSignOn] =>
[SeaServicesSignOff] =>
[SeaServicesCompanysNameContactPhoneNumber] =>
[SaveForm] => Save form
[cf_id] => 0
)
Array
(
)
Errors
Array
(
)
Debug Info
Array
(
[4] => Array
(
[DB Save] => Array
(
[Queries] => Array
(
)
)
)
)
and attached my form, when downloading form, please delete from here.
Hi Raimis,
You have changed the Replacer in the CertificatesMulti container to ##
BUT you have left __N__ in all the element names and ids in the container.
These two have to be the same for the Replacer to be replaced.
Bob
You have changed the Replacer in the CertificatesMulti container to ##
BUT you have left __N__ in all the element names and ids in the container.
These two have to be the same for the Replacer to be replaced.
Bob
Data Array
Errors
Debug Info
In database field is empty :/
Array
(......
[Certificate] => Array
(
[##] => Array
(
[NationalLicenseGrade] => veinas
[LicenseNumber] => asdasd
[PlaceOfIssue] => asdasd
[DateOfIssue] => 21-10-2015
)
[1] => Array
(
[NationalLicenseGrade] => du
[LicenseNumber] => asdasdasdasd
[PlaceOfIssue] => asdasdasd
[DateOfIssue] => 21-10-2015
)
)
........
Errors
Array
(
)
Debug Info
Array
(
[4] => Array
(
[DB Save] => Array
(
[Queries] => Array
(
)
)
)
)
In database field is empty :/
Hi Raimis,
That looks better - you should probably hide the first one so that you don't get the ## used as an index.
I can't tell from here why the basic DB Save isn't working - you'll need to de bug that.
You haven't said how you want to save this certificate data? Personally, I would grab the ID of the new that has been created for the form and add that to each of these entries in a Custom Code action:
Then use a second DB Save set to do multiple saves and with the Model ID set to Certificate.
Bob
That looks better - you should probably hide the first one so that you don't get the ## used as an index.
I can't tell from here why the basic DB Save isn't working - you'll need to de bug that.
You haven't said how you want to save this certificate data? Personally, I would grab the ID of the new that has been created for the form and add that to each of these entries in a Custom Code action:
<?php
foreach($form->data['Certificate'] as $k => $v ) {
$form->data['Certificate'][$k]['record_id'] = $form->data['cf_id'];
}
?>
Then use a second DB Save set to do multiple saves and with the Model ID set to Certificate.
Bob
No, i don't hide first. Hide first: No.
Probably i creating wrong DB tables.... :/
Now i create table row 'certificate', but same, no data in this row... :/
can make/send me demo with one simple text field and one Multiplier field and saveDB array ? 😶 i try search in forum, but not found attachment, what need for me ?
Probably i creating wrong DB tables.... :/
Now i create table row 'certificate', but same, no data in this row... :/
can make/send me demo with one simple text field and one Multiplier field and saveDB array ? 😶 i try search in forum, but not found attachment, what need for me ?
From debugger
From DB:
DB:
Data Array
Array
(
[option] => com_chronoforms5
[chronoform] => CertificatesMultiSave
[event] => submit
[userID] => 831
[PersonalFirstName] => name
[PersonalSurname] => Surname
[PersonalDateOfBirth] => 2015-10-28
[PersonalPlaceOfBirth] => kazkur
[Certificate] => Array
(
[1] => Array
(
[NationalLicenseGrade] => du
[LicenseNumber] => asdasdasdasd
[PlaceOfIssue] => asdasdasd
[DateOfIssue] => 21-10-2015
[record_id] => 29
)
[2] => Array
(
[NationalLicenseGrade] => trys
[LicenseNumber] => asd
[PlaceOfIssue] => asd
[DateOfIssue] => 21-10-2015
[record_id] => 29
)
[3] => Array
(
[NationalLicenseGrade] => vienas
[LicenseNumber] => jhkhjk
[PlaceOfIssue] => hjkhjk
[DateOfIssue] => 21-10-2015
[record_id] => 29
)
)
[button160] => Submit
[cf_id] => 29
[Data] => Array
(
[id] => 0
)
)
Array
(
)
Errors
Array
(
)
Debug Info
Array
(
[4] => Array
(
[DB Save] => Array
(
[Queries] => Array
(
[0] => INSERT INTO `jos_cf_UserBase` (`PersonalFirstName`, `PersonalSurname`, `PersonalDateOfBirth`, `PersonalPlaceOfBirth`, `user_id`, `uniq_id`, `created`) values ('name', 'Surname', '2015-10-28', 'kazkur', '831', 'd6ed26efb5958be7ee9a92c8499218e9922698fa', '2015-10-14 00:52:31');
)
)
)
[25] => Array
(
[DB Save] => Array
(
[Queries] => Array
(
)
)
)
)
From DB:
-- phpMyAdmin SQL Dump
-- version 4.3.9
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Oct 14, 2015 at 04:00 AM
-- Server version: 10.0.21-MariaDB-log
-- PHP Version: 5.5.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- Database: `------`
--
-- --------------------------------------------------------
--
-- Table structure for table `##__cf_UserBase`
--
CREATE TABLE IF NOT EXISTS `##__cf_UserBase` (
`cf_id` int(11) NOT NULL,
`uniq_id` varchar(50) NOT NULL,
`user_id` int(11) NOT NULL,
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`modified` datetime DEFAULT NULL,
`PersonalFirstName` varchar(64) NOT NULL,
`PersonalSurname` varchar(64) NOT NULL,
`PersonalDateOfBirth` varchar(64) NOT NULL,
`PersonalPlaceOfBirth` varchar(64) NOT NULL,
`Certificate` varchar(255) NOT NULL,
`CertificateNationalLicenseGrade` varchar(255) NOT NULL,
`CertificateLicenseNumber` varchar(255) NOT NULL,
`CertificatePlaceOfIssue` varchar(255) NOT NULL,
`CertificateDateOfIssue` varchar(255) NOT NULL,
) ENGINE=MyISAM AUTO_INCREMENT=30 DEFAULT CHARSET=utf8;
--
-- Dumping data for table `##__cf_UserBase`
--
INSERT INTO `##__cf_UserBase` (`cf_id`, `uniq_id`, `user_id`, `created`, `modified`, `PersonalFirstName`, `PersonalSurname`, `PersonalDateOfBirth`, `PersonalPlaceOfBirth`, `Certificate`, `CertificateNationalLicenseGrade`, `CertificateLicenseNumber`, `CertificatePlaceOfIssue`, `CertificateDateOfIssue`) VALUES
(29, 'd6ed26efb5958be7ee9a92c8499218e9922698fa', 831, '2015-10-14 00:52:31', NULL, 'name', 'Surname', '2015-10-28', 'kazkur', '', '', '', '', '');
-- --------------------------------------------------------
--
-- Table structure for table `##__cf_UserBaseCertificate`
--
CREATE TABLE IF NOT EXISTS `##__cf_UserBaseCertificate` (
`id` int(11) NOT NULL,
`record_id` varchar(50) NOT NULL,
`NationalLicenseGrade` varchar(255) NOT NULL,
`LicenseNumber` varchar(255) NOT NULL,
`PlaceOfIssue` varchar(255) NOT NULL,
`DateOfIssue` varchar(255) NOT NULL
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `##__cf_UserBase`
--
ALTER TABLE `##__cf_UserBase`
ADD PRIMARY KEY (`cf_id`);
--
-- Indexes for table `##__cf_UserBaseCertificate`
--
ALTER TABLE `##__cf_UserBaseCertificate`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `##__cf_UserBase`
--
ALTER TABLE `##__cf_UserBase`
MODIFY `cf_id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=30;
--
-- AUTO_INCREMENT for table `##__cf_UserBaseCertificate`
--
ALTER TABLE `##__cf_UserBaseCertificate`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=4;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
DB:

Hi Raimis,
Everything looks OK except for the second DB Save; what settings do you have there? Something fundamental is missing as it's creating an empty query.
You also need to add a record_id column to the new table to save the record_id. After doing this in PHpMyAdmin please click the ChronoForms Delete Cache icon in the Forms Manager toolbar to update the cached table info.
Bob
Everything looks OK except for the second DB Save; what settings do you have there? Something fundamental is missing as it's creating an empty query.
You also need to add a record_id column to the new table to save the record_id. After doing this in PHpMyAdmin please click the ChronoForms Delete Cache icon in the Forms Manager toolbar to update the cached table info.
Bob
record_id i add in
if no Handle Arrays before first DB i getting error
if add debugger show verry intersing:
in second DBsave settings is
CREATE TABLE IF NOT EXISTS `##__cf_UserBaseCertificate` (
`id` int(11) NOT NULL,
`record_id` varchar(50) NOT NULL,
`NationalLicenseGrade` varchar(255) NOT NULL,
`LicenseNumber` varchar(255) NOT NULL,
`PlaceOfIssue` varchar(255) NOT NULL,
`DateOfIssue` varchar(255) NOT NULL
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
if no Handle Arrays before first DB i getting error
1054 - Unknown column 'Array' in 'field list' SQL=INSERT INTO `jos_cf_UserBase` (`PersonalFirstName`, `PersonalSurname`, `PersonalDateOfBirth`, `PersonalPlaceOfBirth`, `Certificate`, `user_id`, `uniq_id`, `created`) values ('name', 'Surname', '2015-10-27', 'asd', Array, '831', 'aa4e0fa6fd1e7f36b5cc32b62eed4db945fe472d', '2015-10-15 00:59:48');
if add debugger show verry intersing:
Data Array
Array
(
[option] => com_chronoforms5
[chronoform] => CertificatesMultiSave
[event] => submit
[userID] => 831
[PersonalFirstName] => name
[PersonalSurname] => Surname
[PersonalDateOfBirth] => 2015-10-27
[PersonalPlaceOfBirth] => asd
[Certificate] => 0rray,Array,Array
[button160] => Submit
[cf_id] => 78
)
Array
(
)
Errors
Array
(
)
Debug Info
Array
(
[4] => Array
(
[DB Save] => Array
(
[Queries] => Array
(
[0] => INSERT INTO `jos_cf_UserBase` (`PersonalFirstName`, `PersonalSurname`, `PersonalDateOfBirth`, `PersonalPlaceOfBirth`, `Certificate`, `user_id`, `uniq_id`, `created`) values ('name', 'Surname', '2015-10-27', 'asd', 'Array,Array,Array', '831', '48f702a8e6bf3024a9efbc0fb25690d4f23f8839', '2015-10-15 01:04:45');
)
)
)
[23] => Array
(
[DB Save] => Array
(
[Queries] => Array
(
)
)
)
)
in second DBsave settings is

Hi Raimis,
If you have a table column called Certificate then you can't also use Certificate as the Model ID for another table as there is no way to separate the two different uses.
Bob
If you have a table column called Certificate then you can't also use Certificate as the Model ID for another table as there is no way to separate the two different uses.
Bob
all works fine thank you, but how in my form edit multiple fields ? text and select fields edit simple, in Field Name add "Model ID" form Read DB and i see info from DB, but how do this with multiplier ?
This topic is locked and no more replies can be posted.