spudnukem
Založený: 18.04.2008
Príspevky: 3
Zaslal: 2010-12-08 21:54
Návrat hore
Odpovedať s citátom
|
Hi, probably could be done better but this is how I got different link types in a value ie skype, mailto and pbx or any other call based on a contact type field and an address from another field.... hope it helps someone!
| Kód: |
$opts['fdd']['conType'] = array(
'name' => 'conType',
'select' => 'D',
'php' => 'test.php',
'values' => array('Skype','Email','Phone','NONE'),
'maxlen' => 60,
'default' => '0',
'sort' => true
);
$opts['fdd']['address'] = array(
'name' => 'Address',
'select' => 'T',
'escape' => false,
'maxlen' => 60,
'sort' => true
); |
and in my test.php;
| Kód: |
<?php
//print_r($row);
if($value == 'Skype'){
echo '<a href=skype:'.$row['qf3'].'?call>skype</a>';
}elseif($value == 'Email'){
echo '<a href=mailto:'.$row['qf3'].'>email</a>';
}elseif($value == 'Phone'){
echo '<a href=javascript:void(0); onclick=callpbx('.$row['qf3'].');>phone</a>';
}else{
echo $value;
}
return;
?> |
I used the print_r to obtain the correct entry for the address field....
|
|
Odoslať novú tému
Odpovedať na tému
|
|
|