Page 1 of 1
Drop Down List in Customized Column
Posted: Mon Apr 01, 2013 2:44 am
by shahparz
If you have multiple options in a customized column then u can use these lines to make the junk links as drop down.
(The following are server events. Read "Server Events and Client Scripts" in the help file first.)
function ListOptions_Load() {
$opt =& $this->ListOptions->Add("new1");
$opt->Header = "Selections";
$opt->OnLeft = TRUE; // Link on left
$opt->MoveTo(1); // Move to first column
}
function ListOptions_Rendered() {
$v_student_id = CurrentTable()->student_id->CurrentValue;
$this->ListOptions->Items["new1"]->Body="<select class='menu_choice' name='non-cccr_stuff' onchange='window.location=this.value'>
<option value='#list'><b>Please Select .......</b></option>
<option value='bfd.php?student_id=$v_student_id'>Admission Form</option>
<option value='bfd.php?student_id=$v_student_id'>Authority Card</option>
<option value='bfd.php?student_id=$v_student_id'>Bonafide Certificate</option>
<option value='bfd.php?student_id=$v_student_id'>Character Certificate</option>
<option value='bfd.php?student_id=$v_student_id'>Participation Certificate</option>
<option value='bfd.php?student_id=$v_student_id'>School Leaving Certificate</option>
</select>";
Hope to helped u guys.
Re: Drop Down List in Customized Column
Posted: Wed Oct 08, 2014 5:20 am
by oliveira
Got it!
I modified this code
// "detail_copiar"
$oListOpt =& $this->ListOptions->Items["detail_copiar"];
if ($Security->AllowList('copiar')) {
$oListOpt->Body = $Language->Phrase("DetailLink") . $Language->TablePhrase("copiar", "TblCaption");
$oListOpt->Body = "<a href=\"cal2.php?" . "CARTEIRA=" . urlencode(strval($socios->CARTEIRA->CurrentValue)) . "\">" . $oListOpt->Body . "</a>";
to this
// "detail_copiar2"
$oListOpt =& $this->ListOptions->Items["detail_copiar2"];
if ($Security->AllowList('copiar')) {
//$oListOpt->Body = $Language->Phrase("DetailLink") . $Language->TablePhrase("", "");
$oListOpt->Body = "" . "CARTEIRA=" . urlencode(strval($socios->CARTEIRA->CurrentValue)) ;
then
function ListOptions_Rendered() {
//$v_socios_id = $oListOpt->Body;
//$oListOpt =& $this->ListOptions->Items["copy"];
$oListOpt =& $this->ListOptions->Items["detail_copiar2"];
$oListOpt->Body = "" . $oListOpt->Body . "";
$this->ListOptions->Items["new1"]->Body="<select class='menu_choice' name='non-cccr_stuff' onchange='window.location=this.value'>
<option value='#list'><b>Selecione</b></option>
<option value='bfd.php?$oListOpt->Body'>Admission Form</option>
</select>";
Re: Drop Down List in Customized Column
Posted: Fri Sep 16, 2016 5:53 am
by oliveira
Its ok for a cancel button