I'm using the GMapFP component on a Joomla! page and am struggling to make a directions portion work when it looks how I want it too.
The link is:
http://tinyurl.com/phpquestion
I'm trying to make the FROM only have the text line, but whenever I remove the options pulldown, it looks correct, but code doesn't work.
On the TO portion, I'm trying to make the dropdown menu already have an item selected and remove the "Click here ..." option.
In the code below, the "GMAPFP_CHOIX_VERS" is the JText for "Click here ..."
Code:
<select name="select_to'.$num.'" id="select_to'.$num.'">
<option value="">'.JText::_( 'GMAPFP_CHOIX_VERS' ).'</option>';
foreach($rows_orderA as $row) {
$selected = '';
if (isset($row->glat) && isset($row->glng) && !empty($row->glat) && !empty($row->glng)) {
$value = $row->glat.','.$row->glng;
} else {
$value = @$row->pay.' '.@$row->codepostal.' '.@$row->ville.' '.@$row->adresse.' '.@$row->adresse2;
}
$carte .= '<option value="'.$value.'" '.$selected.'>'.$row->nom.'</option>';
}
$carte.='
</select>
Ideally, I could hide the whole TO part and just have the store's destination be set.
Do I need to include any more code or detail?