hide fields based on the value of another field

pkjoshi

Active Member
I am trying to hide certain elements from detail view based on the value of other fields.

I am able to achieve the same using calc element for simple text fields.
But the same is not working for fields(elements) like rating, facebook-like etc. as I am not able to replicate these fields using return.

I want to hide these fields based on a value on another field in the same list and mysql-table.

 
have you tried adding js events to the element? There' s a built in set of dropdowns to enable you to achieve this.
 
Yes I have tried that as well, but for the field types I mentioned is not working. I was able to achieve the same though using some crude method.
for example in the custom template - default group.php
PHP:
<?php
        $this->element = $this->elements['listing_type'];
        $listing5 = $this->loadTemplate('element');
        if (stripos($listing5,"Premium")!==false){
        $this->element = $this->elements['rating'];
        echo $this->loadTemplate('element');
        } else   {
        }
            ?>
I think there is a better way of doing it.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top