Home News Contact Us Forum About Us Demos Products F.A.Q.
Shopping Cart
You currently have 0 items in your cart.


Recent Events
  • 31/12/2023 New Year SALE

    We are glad to announce New Year SALE. 25% discount for all our extensions. Use NY24 coupon code. Hurry up the discount is valid till 7 January.

  • 21/11/2023 BLACK FRIDAY 23 is coming

    BIG SALE, 35% discount for all our extensions. Use BF23 coupon code. Hurry up the discount is valid till 27 November.


2Checkout.com, Inc. is an authorized retailer of goods and services provided by ARI Soft. 2CheckOut




Follow us on twitter



Welcome, Guest
Please Login or Register.    Lost Password?

Data table from a user
(1 viewing) (1) Guest
Go to bottomPage: 12
TOPIC: Data table from a user
*
#48721
Data table from a user 10 Years ago Karma: 0
Hi,

I use rsforms pro and i want to make a table/graph from the submissions of the logged user.

I have a form where automatic the userid is stored, as a Fieldname-> FieldValue

what I want to show is the following:
Sort on the submitted date in the form, the submitted distance of a specific Form of the logged user

See in the below code:
submitted date -> 'Datum'
submitted distance -> 'Afstand'
specific Form - FormId = 1
User id can be found at 'Usernr' this is the smae number of the Joomla UserId

I hope you understand what i mean

Code:

-- phpMyAdmin SQL Dump
-- version 4.0.9
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Apr 02, 2014 at 10:39 AM
-- Server version: 5.5.34-32.0-log
-- PHP Version: 5.3.27

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: `deb24708_jos2`
--

-- --------------------------------------------------------

--
-- Table structure for table `jos_rsform_submission_values`
--

CREATE TABLE IF NOT EXISTS `jos_rsform_submission_values` (
  `SubmissionValueId` int(11) NOT NULL AUTO_INCREMENT,
  `FormId` int(11) NOT NULL,
  `SubmissionId` int(11) NOT NULL DEFAULT '0',
  `FieldName` text NOT NULL,
  `FieldValue` text NOT NULL,
  PRIMARY KEY (`SubmissionValueId`),
  KEY `FormId` (`FormId`),
  KEY `SubmissionId` (`SubmissionId`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=366 ;

--
-- Dumping data for table `jos_rsform_submission_values`
--

INSERT INTO `jos_rsform_submission_values` (`SubmissionValueId`, `FormId`, `SubmissionId`, `FieldName`, `FieldValue`) VALUES
(337, 1, 25, 'Zelfvertrouwen', '6'),
(336, 1, 25, 'Gezondheid', '3'),
(335, 1, 25, 'Details', ''),
(334, 1, 25, 'Samenvatting', 'test'),
(333, 1, 25, 'Hartslag', ''),
(332, 1, 25, 'Duur training', '60'),
(331, 1, 25, 'Afstand', '666'),
(330, 1, 25, 'Datum', '31-03-2014'),
(329, 1, 25, 'Usernr', '473'),
(328, 1, 25, 'gebruikersnaam', 'Klaas'),
(343, 1, 25, 'Trainer', 'Humphrey'),
(344, 1, 25, 'Opmerkingen Trainer', ''),
(345, 1, 25, 'Opslaan', 'Opslaan'),
(346, 1, 25, 'formId', '1'),
(347, 1, 26, 'gebruikersnaam', 'Remco van de Berkt'),
(348, 1, 26, 'Usernr', '472'),
(349, 1, 26, 'Datum', '01-04-2014'),
(350, 1, 26, 'Afstand', '2050'),
(351, 1, 26, 'Duur training', '60'),
(352, 1, 26, 'Hartslag', ''),
(353, 1, 26, 'Samenvatting', 'Veel benen'),
(354, 1, 26, 'Details', '2x 400 benen'),
(355, 1, 26, 'Gezondheid', '8'),
(356, 1, 26, 'Zelfvertrouwen', '8'),
(357, 1, 26, 'Slaap', '7'),
(358, 1, 26, 'Energie', '8'),
(359, 1, 26, 'Enthousiasme ', '7'),
(360, 1, 26, 'Spierpijn', '1'),
(361, 1, 26, 'Communicatie met de trainer', '4'),
(362, 1, 26, 'Trainer', 'Humphrey'),
(363, 1, 26, 'Opmerkingen Trainer', ''),
(364, 1, 26, 'Opslaan', 'Opslaan'),
(365, 1, 26, 'formId', '1');

/*!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 */;

The administrator has disabled public write access.
 
#48724
Re:Data table from a user 10 Years ago Karma: 747
Hello,

You can read here how to show data for "RS Form" using "ARI Data Tables" module.

Regards,
ARI Soft
The administrator has disabled public write access.
 
#48725
Re:Data table from a user 10 Years ago Karma: 0
Yes i found that to,

But how can replace SubmissionId for the UserId from the logged user and only show his submitted form values
The administrator has disabled public write access.
 
#48727
Re:Data table from a user 10 Years ago Karma: 747
Are user IDs stored separately for submissions, for example in jos_rsform_submissions table?

Regards,
ARI Soft
The administrator has disabled public write access.
 
#48729
Re:Data table from a user 10 Years ago Karma: 0
Yes these are

Code:

-- phpMyAdmin SQL Dump
-- version 4.0.9
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Apr 02, 2014 at 11:47 AM
-- Server version: 5.5.34-32.0-log
-- PHP Version: 5.3.27

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: `deb24708_jos2`
--

-- --------------------------------------------------------

--
-- Table structure for table `jos_rsform_submissions`
--

CREATE TABLE IF NOT EXISTS `jos_rsform_submissions` (
  `SubmissionId` int(11) NOT NULL AUTO_INCREMENT,
  `FormId` int(11) NOT NULL DEFAULT '0',
  `DateSubmitted` datetime NOT NULL,
  `UserIp` varchar(15) NOT NULL DEFAULT '',
  `Username` varchar(255) NOT NULL DEFAULT '',
  `UserId` text NOT NULL,
  `Lang` varchar(255) NOT NULL,
  `confirmed` tinyint(1) NOT NULL,
  PRIMARY KEY (`SubmissionId`),
  KEY `FormId` (`FormId`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=27 ;

--
-- Dumping data for table `jos_rsform_submissions`
--

INSERT INTO `jos_rsform_submissions` (`SubmissionId`, `FormId`, `DateSubmitted`, `UserIp`, `Username`, `UserId`, `Lang`, `confirmed`) VALUES
(1, 1, '2014-03-10 15:10:20', '------', 'zwemmer2', '470', 'nl-NL', 1),
(2, 1, '2014-03-11 08:04:08', '------', 'zwemmer1', '469', 'nl-NL', 1),
(3, 1, '2014-03-11 08:10:46', '------', 'zwemmer1', '469', 'nl-NL', 1),
(4, 1, '2014-03-11 08:12:40', '------', 'zwemmer1', '469', 'nl-NL', 1),
(5, 1, '2014-03-11 09:04:42', '------', 'zwemmer1', '469', 'nl-NL', 1),
(6, 1, '2014-03-11 09:18:12', '------', 'zwemmer1', '469', 'nl-NL', 1),
(7, 1, '2014-03-11 09:28:18', '------', 'zwemmer1', '469', 'nl-NL', 1),
(8, 3, '2014-03-11 12:06:56', '------', 'trainer', '471', 'nl-NL', 1),
(9, 1, '2014-03-12 11:53:58', '------', 'zwemmer2', '470', 'nl-NL', 1),
(10, 1, '2014-03-12 11:56:01', '------', 'zwemmer2', '470', 'nl-NL', 1),
(11, 1, '2014-03-12 12:25:45', '------', 'zwemmer1', '469', 'nl-NL', 1),
(12, 1, '2014-03-12 12:30:18', '------', 'zwemmer1', '469', 'nl-NL', 1),
(13, 1, '2014-03-12 12:32:17', '------', 'zwemmer1', '469', 'nl-NL', 1),
(14, 3, '2014-03-12 19:46:09', '------', 'trainer', '471', 'nl-NL', 1),
(15, 1, '2014-03-12 19:50:03', '------', 'zwemmer1', '469', 'nl-NL', 1),
(25, 1, '2014-03-31 14:26:32', '------', 'remcovandeberkt', '472', 'nl-NL', 1),
(22, 1, '2014-03-26 07:50:41', '------', 'remcovandeberkt', '472', 'nl-NL', 1),
(23, 1, '2014-03-26 20:14:04', '------', 'remcovandeberkt', '472', 'nl-NL', 1),
(26, 1, '2014-04-02 06:53:39', '------', 'remcovandeberkt', '472', 'nl-NL', 1);

/*!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 */;

The administrator has disabled public write access.
 
#48732
Re:Data table from a user 10 Years ago Karma: 747
Use the following SQL query:

SELECT
SV.SubmissionId,
SV.FieldName,
SV.FieldValue
FROM
#__rsform_submission_values SV INNER JOIN #__rsform_submissions S
ON SV.SubmissionId = S.SubmissionId
WHERE
SV.FormId = 1 AND S.UserId = {$UserId}
ORDER BY SV.SubmissionId DESC, SV.FieldName ASC

Regards,
ARI Soft
The administrator has disabled public write access.
 
Go to topPage: 12