Forum

Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.

How to make dropdow...
 
Notifications
Clear all

How to make dropdown visible true/ false and required true/ false?

2 Posts
2 Users
0 Reactions
4,457 Views
Sagar
(@sagar-toshniwal)
Posts: 72
Active Member
Topic starter
 
[#3584]

I am making a small change in the Ticket form. Based on a particular status, I want to show Priority dropdown and make it mandatory. However, in all statuses before this, the Priority dropdown is hidden. The statuses are driven by workflow.

I could make the dropdown readOnly true or false. However, I am not getting any solution to make it visible true or false, and required true or false.

Please help.


I am an Eagle. On a mission to help those who want to help themselves...

 
Posted : 19 Aug 2016 8H49
babynus
(@babynus)
Posts: 14966
Main Contributor Admin
 

Just use $_fieldsAttributes that you change in constructor

function __construct($id = NULL, $withoutDependentObjects=false) {
parent::__construct($id,$withoutDependentObjects);
    if ($this->idStatus=1 or $this->idStatus=2) { // and so on
      self::$_fieldsAttributes['idPriority']='hidden';
    } else {
      self::$_fieldsAttributes['idPriority']='required';
    }
}

 
Posted : 19 Aug 2016 11H22
Share:

Scroll to Top