1. Hugh (cheesegrits) here. Thank you for all the good wishes. My back surgery was a success, post-op recovery is going well, and I'm getting stronger and feeling better every day. I hope to be getting back in the saddle and working support again over the next few days.
  2. IMPORTANT NOTE - we have made some changes in our github branch naming. The 'master' branch no longer exists, and is now called 'joomla25' (which is Fabrik 3.0). The 'joomla3' branch (which is Fabrik 3.2) remains unchanged. We have also removed all the other testing branches which had accuulated over the last few years. I have posted a thread in the Community forum for 3.0 with some more information, feel free to as questions there.

Cheking for details view

Discussion in 'Fabrik 3.x Testing' started by rajeshproreal, May 5, 2012.

  1. rajeshproreal New Member

    Level: Community
    Hi

    I have a list where the data is entered only by the admin. In some rows, some elements have no value.

    I want all the elements to be visible in the 'edit' view so that I can fill in the required elements.

    In the 'details' view (for the public), I want to hide the elements that have no value.

    I added the following condition to default_group.php:

    <?php if ($element->value) { ?>
    .......
    .......
    <?php }?>


    This does hide the empty elements in details view, but it also hides them in edit view.

    Is there a way to make them hide only in details view?

    Alternately, how can I add a condition to show the empty elements only to 'special' users.

    Thanks

    Rajesh
  2. felixkat Senior Member

    Level: Community
    Yes you could code this and I'm pretty sure there's info about this in the Wiki as I remember a fairly recent post about it.

    However you could also just create two forms, one for edit and one for form view.
  3. rob Administrator

    Level: Community
    Generally this works:

    PHP:

    if (JRequest::getVar('view') == 'details') {
     // you are in a details view.....
    }
     

Share This Page