private function setConditionFormName(\Magento\Rule\Model\Condition\AbstractCondition $conditions, $formName)
    {
        $conditions->setJsFormObject($formName);

        if ($conditions->getConditions() && is_array($conditions->getConditions())) {
            foreach ($conditions->getConditions() as $condition) {
                $this->setConditionFormName($condition, $formName);
            }
        }
    }
private function setConditionFormName(\Magento\Rule\Model\Condition\AbstractCondition $conditions, $formName)
    {
        $conditions->setJsFormObject($formName);

        if ($conditions->getConditions() && is_array($conditions->getConditions())) {
            foreach ($conditions->getConditions() as $condition) {
                $this->setConditionFormName($condition, $formName);
            }
        }
    }
private function setConditionFormName ( \ Magento \ Rule \ Model \ Condition \ AbstractCondition $ conditions , $ formName ) { $ conditions -> setJsFormObject ( $ formName ) ; if ( $ conditions -> getConditions ( ) && is_array ( $ conditions -> getConditions ( ) ) ) { foreach ( $ conditions -> getConditions ( ) as $ condition ) { $ this -> setConditionFormName ( $ condition , $ formName ) ; } } }
Set proper form name to rule conditions.

@param \Magento\Rule\Model\Condition\AbstractCondition $conditions Rule conditions.
@param string                                          $formName   Form Name.

@return void
Set proper form name to rule conditions .