Hi,
How can I populate a form field with an Eventlist event title?
I'm using chronocontact plugin to display the form inside the events description.
So, the idea would be to get the event title(also date and time would be wonderfull!) displayed in the form and sent through email.
Greetings,
🙄
How can I populate a form field with an Eventlist event title?
I'm using chronocontact plugin to display the form inside the events description.
So, the idea would be to get the event title(also date and time would be wonderfull!) displayed in the form and sent through email.
Greetings,
🙄
Hi luisbarros,
You'd need to look up the event details in the EventsList tables - but I don't know what you need to look up or how you get the event_id.
Bob
You'd need to look up the event details in the EventsList tables - but I don't know what you need to look up or how you get the event_id.
Bob
Dear Bob,
Thank you very much for your reply.
I have no knowledge of php/mysql coding, so I exported the events table from eventlist. Can you help me?
Here it goes:
Table structure for table `jos_eventlist_events`
--
CREATE TABLE IF NOT EXISTS `jos_eventlist_events` (
`id` int(11) unsigned NOT NULL auto_increment,
`locid` int(11) unsigned NOT NULL default '0',
`catsid` int(11) unsigned NOT NULL default '0',
`dates` date NOT NULL default '0000-00-00',
`enddates` date default NULL,
`times` time default NULL,
`endtimes` time default NULL,
`title` varchar(100) NOT NULL default '',
`alias` varchar(100) NOT NULL default '',
`created_by` int(11) unsigned NOT NULL default '0',
`modified` datetime NOT NULL,
`modified_by` int(11) unsigned NOT NULL default '0',
`author_ip` varchar(15) NOT NULL default '',
`created` datetime NOT NULL,
`datdescription` mediumtext NOT NULL,
`meta_keywords` varchar(200) NOT NULL default '',
`meta_description` varchar(255) NOT NULL default '',
`recurrence_number` int(2) NOT NULL default '0',
`recurrence_type` int(2) NOT NULL default '0',
`recurrence_counter` date NOT NULL default '0000-00-00',
`datimage` varchar(100) NOT NULL default '',
`checked_out` int(11) NOT NULL default '0',
`checked_out_time` datetime NOT NULL default '0000-00-00 00:00:00',
`registra` tinyint(1) NOT NULL default '0',
`unregistra` tinyint(1) NOT NULL default '0',
`published` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=15 ;
--
-- Dumping data for table `jos_eventlist_events`
--
INSERT INTO `jos_eventlist_events` (`id`, `locid`, `catsid`, `dates`, `enddates`, `times`, `endtimes`, `title`, `alias`, `created_by`, `modified`, `modified_by`, `author_ip`, `created`, `datdescription`, `meta_keywords`, `meta_description`, `recurrence_number`, `recurrence_type`, `recurrence_counter`, `datimage`, `checked_out`, `checked_out_time`, `registra`, `unregistra`, `published`) VALUES
(1, 1, 1, '2010-03-18', NULL, '21:00:00', NULL,
Thank you very much for your reply.
I have no knowledge of php/mysql coding, so I exported the events table from eventlist. Can you help me?
Here it goes:
Table structure for table `jos_eventlist_events`
--
CREATE TABLE IF NOT EXISTS `jos_eventlist_events` (
`id` int(11) unsigned NOT NULL auto_increment,
`locid` int(11) unsigned NOT NULL default '0',
`catsid` int(11) unsigned NOT NULL default '0',
`dates` date NOT NULL default '0000-00-00',
`enddates` date default NULL,
`times` time default NULL,
`endtimes` time default NULL,
`title` varchar(100) NOT NULL default '',
`alias` varchar(100) NOT NULL default '',
`created_by` int(11) unsigned NOT NULL default '0',
`modified` datetime NOT NULL,
`modified_by` int(11) unsigned NOT NULL default '0',
`author_ip` varchar(15) NOT NULL default '',
`created` datetime NOT NULL,
`datdescription` mediumtext NOT NULL,
`meta_keywords` varchar(200) NOT NULL default '',
`meta_description` varchar(255) NOT NULL default '',
`recurrence_number` int(2) NOT NULL default '0',
`recurrence_type` int(2) NOT NULL default '0',
`recurrence_counter` date NOT NULL default '0000-00-00',
`datimage` varchar(100) NOT NULL default '',
`checked_out` int(11) NOT NULL default '0',
`checked_out_time` datetime NOT NULL default '0000-00-00 00:00:00',
`registra` tinyint(1) NOT NULL default '0',
`unregistra` tinyint(1) NOT NULL default '0',
`published` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=15 ;
--
-- Dumping data for table `jos_eventlist_events`
--
INSERT INTO `jos_eventlist_events` (`id`, `locid`, `catsid`, `dates`, `enddates`, `times`, `endtimes`, `title`, `alias`, `created_by`, `modified`, `modified_by`, `author_ip`, `created`, `datdescription`, `meta_keywords`, `meta_description`, `recurrence_number`, `recurrence_type`, `recurrence_counter`, `datimage`, `checked_out`, `checked_out_time`, `registra`, `unregistra`, `published`) VALUES
(1, 1, 1, '2010-03-18', NULL, '21:00:00', NULL,
Hi luisbarros,
OK, from this you can use this code to get the info
But you still need to find the event id to replace the ???? This may be availalbe from the page url?
Bob
OK, from this you can use this code to get the info
<?php
if ( !$mainframe->isSite(0 ) { return; }
$db =& JFactory::getDBO();
$query = "
SELECT `title`, `dates`, `times`
FROM `#__eventlist_events`
WHERE `id` = ???? ;
";
$db->setQuery($query);
$event = $db->loadObject();
?>
But you still need to find the event id to replace the ???? This may be availalbe from the page url?
Bob
Thank you very much for your help.😀
What's the best way to use the script?
Put it on a field or using the profile plugin?
Greetings,
Luis
What's the best way to use the script?
Put it on a field or using the profile plugin?
Greetings,
Luis
Hi Luisbarron,
This goes at the beginning of the Form HTML - but caution - it's not complete. You need to add more code to link it to your form.
Bob
This goes at the beginning of the Form HTML - but caution - it's not complete. You need to add more code to link it to your form.
Bob
Do you mean the event ID, right? ...or ... is there anything else?
Thanx
Thanx
Like put them in a text box?🙄
This topic is locked and no more replies can be posted.