1. Pascal Wickert
  2. Sherlock Holmes The Voice
  3. General Talk
  4. Tuesday, 20 February 2018
  5.  Subscribe via email
Hello Yves,

long time no see. Our installation of Matukio 6.1.5 is working well. I did not yet upgrade to version 7 but I should do it this summer when the registration are lower than now.

I am trying, using RSForm pro, to populate a dropdown list field with a list of our current events. I am able to display all the events but not only the currents one. Here is the php code I used in the specific field within a RSForm Pro form :



//<code>
// Prepare the empty array
$items = array();
// Prepare the database connection
$db = JFactory::getDbo();
// Keep this if you'd like a "Please select" option, otherwise comment or remove it
$items[] = "|Please Select[c]";

// Run the SQL query and store it in $results
$db->setQuery("SELECT title FROM #__matukio");
$results = $db->loadObjectList();

// Now, we need to convert the results into a readable RSForm! Pro format.
// The Items field will accept values in this format:
// value-to-be-stored|value-to-be-shown
// Eg. m|M-sized T-shirt
foreach ($results as $result) {
$value = $result->title;
$label = $result->title;
$items[] = $value.'|'.$label;
}

// Multiple values are separated by new lines, so we need to do this now
$items = implode("\n", $items);

// Now we need to return the value to the field
return $items;
//</code>



Ref.: https://www.rsjoomla.com/support/documentation/rsform-pro/custom-scripting/how-to-store-the-submission-in-a-file-and-send-it-through-the-email.html

As you can see I am not a developper and I have taken their example code that I tweak a bit with Matukio database information. Could you help me to refine the query for the field to show only current event titles?

Thank you so much,

Pascal
Responses (1)


There are %s replies to this question. If you want to see them you need a valid subscription.
If you have a valid subscription, please login now.
Visit store now

Last questions

Is Ccomment still alive?
Is Ccomment still being supported? It's time for my Pro renewal but I haven't se...
2 Replies
Posted on Thursday, 14 August 2025
  • Resolved
  • New
  • Anzeige von mehrtägigen Events auf Buchungsseite
    We have been using Matukio for quite some time now. Unfortunately, we have been ...
    3 Replies
    Posted on Sunday, 03 August 2025
    Assistance Needed – Error When Posting Comments
    Hello, I’m experiencing an issue when trying to submit a comment on my site u...
    0 Replies
    Posted on Sunday, 10 August 2025
    Hotspots Pro 6.0.13 compatability with Joomla 5.3.
    Running Hotspots Pro 6.0.13 on Joomla 4.4.13 and want to upgrade to Joomla 5.3.1...
    2 Replies
    Posted on Friday, 04 July 2025
    some questions on Hotspots
    Hi, On Hotspots extension : 1) is it possible to add our own map layer / v...
    0 Replies
    Posted on Thursday, 03 July 2025