En visitant ce site, vous acceptez l'utilisation de cookies afin de vous proposer les meilleurs services possibles.
//<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 order_number, num_order FROM #__virtuemart_orders");
$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->order_number;
$label = $result->num_order;
$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>Connexion ou Créer un compte pour participer à la conversation.
Connexion ou Créer un compte pour participer à la conversation.
Connexion ou Créer un compte pour participer à la conversation.

