2 Mart 2020 Pazartesi

custom field html veya eventten text kullanma

Liste sayfasında bir değerin 0 veya 0 dan farklı ise kullanıcıya bilgi vermesi için aşağıdakini kullanabilirsin.

foreach($data as $key => $value) {
        if ($value==="0")
                $data[$key]="Tartılmamış";
}
return true;



// Place event code here.
// Use "Add Action" button to add code snippets.

return true;

//bunu before record processed a eklersen sıfır gelen veriyide uyarır.

bunun haricinde custum field view'a şu konu eklersen aynı işi görür hemde html taglarıyla

$info = $data['sontartim']; // get the value of the field assuming the field name is 'testfield'

if ($info == "0") // if the value is 0 assign image
        {
        $fvalue = "<img src=\"http://xxxx.com.tr/TART.png\" />";

}
else if ($info >= " 0 "){ // if value is 1 assign text no image
     
        $fvalue = " $value ";
}

$value = $fvalue;

Hiç yorum yok:

Yorum Gönder