Announcement

Collapse
No announcement yet.

Grid | Change field style with array

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Grid | Change field style with array

    any idea how it works ?


    ***************************
    $arr = array ('field_1', 'field_2');

    foreach ($arr as $field_name)

    {
    if ($this -> $field_name = 0)
    {
    sc_field_style ($field_name, '', '', '#CF5353', '', 'bold');
    }
    else
    {
    }
    }
    ****************************

    above code generates no errors, but the style doesn't change ? btw, all fields are integers.

  • #2
    $this -> $field_name == 0 I guess you wanted that...

    Comment


    • #3
      tried that as well, didn't work !!

      Comment


      • #4
        sometimes you need a quote around the number
        and i see you have } extra

        for the color in grid it didn't work with me unless I add the "else" as well

        Comment

        Working...
        X