Magento 2 - Two dependencies in one field form?Field dependency for category attributessystem.xml dependencies across groups/fieldsetsDependency in admin form field in magento 2Add a note under a form field using ui componentsFailing the dependencies checkHow to add fieldset in Magento custom admin form when field select value changedMagento 2 admin end drop down dependencies?In Magento2 For Ui component Form select Field,Dependency with another FieldFresh Magento 2.1.14, Readiness Check fail with conflicting component dependenciesCustom form field not showing validation message

Is it acceptable for a professor to tell male students to not think that they are smarter than female students?

Avoiding direct proof while writing proof by induction

How do I gain back my faith in my PhD degree?

What does the expression "A Mann!" means

How can I deal with my CEO asking me to hire someone with a higher salary than me, a co-founder?

How can saying a song's name be a copyright violation?

I would say: "You are another teacher", but she is a woman and I am a man

How can I prevent hyper evolved versions of regular creatures from wiping out their cousins?

Im going to France and my passport expires June 19th

Can I run a new neutral wire to repair a broken circuit?

Can my sorcerer use a spellbook only to collect spells and scribe scrolls, not cast?

Why no variance term in Bayesian logistic regression?

What does “the session was packed” mean in this context?

Expand and Contract

Are there any examples of a variable being normally distributed that is *not* due to the Central Limit Theorem?

Am I breaking OOP practice with this architecture?

What method can I use to design a dungeon difficult enough that the PCs can't make it through without killing them?

Arrow those variables!

Can a virus destroy the BIOS of a modern computer?

Why would the Red Woman birth a shadow if she worshipped the Lord of the Light?

Solving a recurrence relation (poker chips)

Gatling : Performance testing tool

How can I determine if the org that I'm currently connected to is a scratch org?

Mathematica command that allows it to read my intentions



Magento 2 - Two dependencies in one field form?


Field dependency for category attributessystem.xml dependencies across groups/fieldsetsDependency in admin form field in magento 2Add a note under a form field using ui componentsFailing the dependencies checkHow to add fieldset in Magento custom admin form when field select value changedMagento 2 admin end drop down dependencies?In Magento2 For Ui component Form select Field,Dependency with another FieldFresh Magento 2.1.14, Readiness Check fail with conflicting component dependenciesCustom form field not showing validation message













1















It is possible to add 2 depedencies to 1 field?



Like this?



->addFieldMap($field_to_evaluate->getHtmlId(), $field_to_evaluate->getName())
->addFieldMap($field_to_show->getHtmlId(), $field_to_show->getName())
->addFieldDependence
(
$field_to_show->getName(),
$field_to_evaluate->getName(),
'dependecy 1'
)
->addFieldDependence
(
$field_to_show->getName(),
$field_to_evaluate->getName(),
'dependecy 2'
)


With this code it looks like only add the first dependency



Can i also indicate if the $field_to_show hides insteand of show?










share|improve this question


























    1















    It is possible to add 2 depedencies to 1 field?



    Like this?



    ->addFieldMap($field_to_evaluate->getHtmlId(), $field_to_evaluate->getName())
    ->addFieldMap($field_to_show->getHtmlId(), $field_to_show->getName())
    ->addFieldDependence
    (
    $field_to_show->getName(),
    $field_to_evaluate->getName(),
    'dependecy 1'
    )
    ->addFieldDependence
    (
    $field_to_show->getName(),
    $field_to_evaluate->getName(),
    'dependecy 2'
    )


    With this code it looks like only add the first dependency



    Can i also indicate if the $field_to_show hides insteand of show?










    share|improve this question
























      1












      1








      1








      It is possible to add 2 depedencies to 1 field?



      Like this?



      ->addFieldMap($field_to_evaluate->getHtmlId(), $field_to_evaluate->getName())
      ->addFieldMap($field_to_show->getHtmlId(), $field_to_show->getName())
      ->addFieldDependence
      (
      $field_to_show->getName(),
      $field_to_evaluate->getName(),
      'dependecy 1'
      )
      ->addFieldDependence
      (
      $field_to_show->getName(),
      $field_to_evaluate->getName(),
      'dependecy 2'
      )


      With this code it looks like only add the first dependency



      Can i also indicate if the $field_to_show hides insteand of show?










      share|improve this question














      It is possible to add 2 depedencies to 1 field?



      Like this?



      ->addFieldMap($field_to_evaluate->getHtmlId(), $field_to_evaluate->getName())
      ->addFieldMap($field_to_show->getHtmlId(), $field_to_show->getName())
      ->addFieldDependence
      (
      $field_to_show->getName(),
      $field_to_evaluate->getName(),
      'dependecy 1'
      )
      ->addFieldDependence
      (
      $field_to_show->getName(),
      $field_to_evaluate->getName(),
      'dependecy 2'
      )


      With this code it looks like only add the first dependency



      Can i also indicate if the $field_to_show hides insteand of show?







      magento2 forms magento-2.0.4 dependency






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked May 30 '16 at 14:41









      Gianni Di FalcoGianni Di Falco

      486522




      486522




















          2 Answers
          2






          active

          oldest

          votes


















          1














          Edit



          This seem to be an issue in Magento2, one possible workaround is



          In your construct inject FieldFactory and also create a protected var for _fieldFactory



          public function __construct(
          ......
          MagentoConfigModelConfigStructureElementDependencyFieldFactory $fieldFactory,
          ......
          )
          ....
          $this->_fieldFactory = $fieldFactory;
          ....



          Then update your existing code to



          $refField = $this->_fieldFactory->create(
          ['fieldData' => ['value' => 'dependecy 1,dependecy 2', 'separator' => ','], 'fieldPrefix' => '']
          );


          ->addFieldDependence
          (
          $field_to_show->getName(),
          $field_to_evaluate->getName(),
          $refField
          )


          I created an issue for this at https://github.com/magento/magento2/issues/4796



          Try



          ->addFieldMap($field_to_evaluate->getHtmlId(), $field_to_evaluate->getName())
          ->addFieldMap($field_to_show->getHtmlId(), $field_to_show->getName())
          ->addFieldDependence
          (
          $field_to_show->getName(),
          $field_to_evaluate->getName(),
          array('dependecy 1','dependecy 2')
          )


          To hide the field by default, you should set the default selected value of that option to the option that would trigger it to hide (to prevent any UI confusion)






          share|improve this answer

























          • I tried that, did not work get error Notice: Array to string conversion taking a look at vendormagentomodule-backendBlockWidgetFormElementDependence.php the first dependency gets overwritten by the seconed if a separe it $this->_depends[$fieldName][$fieldNameFrom] = $refField;

            – Gianni Di Falco
            May 31 '16 at 6:57











          • Wow ty for your interest, have not tried it yet but it seems it may work

            – Gianni Di Falco
            Jun 13 '16 at 6:49


















          -1














          $refField = $this->_fieldFactory->create(['fieldData' => ['value' => '1,2', 'separator' => ','], 'fieldPrefix' => '']
          );



           $this->setChild('form_after', $this->getLayout()->createBlock(
          'MagentoBackendBlockWidgetFormElementDependence')
          ->addFieldMap($action->getHtmlId(), $action->getName())
          ->addFieldMap($anotherFieldweb->getHtmlId(), $anotherFieldweb->getName())
          ->addFieldMap($anotherFieldstore->getHtmlId(), $anotherFieldstore->getName())
          ->addFieldMap($anotherFieldhideorders->getHtmlId(), $anotherFieldhideorders->getName())
          ->addFieldMap($anotherFieldhideinvoice->getHtmlId(), $anotherFieldhideinvoice->getName())
          ->addFieldMap($anotherFieldhideshipment->getHtmlId(), $anotherFieldhideshipment->getName())
          ->addFieldMap($anotherFieldhidecredit->getHtmlId(), $anotherFieldhidecredit->getName())

          ->addFieldDependence($anotherFieldweb->getName(),$action->getName(),1)
          ->addFieldDependence($anotherFieldstore->getName(),$action->getName(),2)
          ->addFieldDependence($anotherFieldhideorders->getName(),$action->getName(),$refField)
          ->addFieldDependence($anotherFieldhideinvoice->getName(),$action->getName(),$refField)
          ->addFieldDependence($anotherFieldhideshipment->getName(),$action->getName(),$refField)
          ->addFieldDependence($anotherFieldhidecredit->getName(),$action->getName(),$refField)
          );




          share








          New contributor




          milan Thakkar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.




















          • This is perfect solution

            – milan Thakkar
            3 mins ago











          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "479"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f117570%2fmagento-2-two-dependencies-in-one-field-form%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          Edit



          This seem to be an issue in Magento2, one possible workaround is



          In your construct inject FieldFactory and also create a protected var for _fieldFactory



          public function __construct(
          ......
          MagentoConfigModelConfigStructureElementDependencyFieldFactory $fieldFactory,
          ......
          )
          ....
          $this->_fieldFactory = $fieldFactory;
          ....



          Then update your existing code to



          $refField = $this->_fieldFactory->create(
          ['fieldData' => ['value' => 'dependecy 1,dependecy 2', 'separator' => ','], 'fieldPrefix' => '']
          );


          ->addFieldDependence
          (
          $field_to_show->getName(),
          $field_to_evaluate->getName(),
          $refField
          )


          I created an issue for this at https://github.com/magento/magento2/issues/4796



          Try



          ->addFieldMap($field_to_evaluate->getHtmlId(), $field_to_evaluate->getName())
          ->addFieldMap($field_to_show->getHtmlId(), $field_to_show->getName())
          ->addFieldDependence
          (
          $field_to_show->getName(),
          $field_to_evaluate->getName(),
          array('dependecy 1','dependecy 2')
          )


          To hide the field by default, you should set the default selected value of that option to the option that would trigger it to hide (to prevent any UI confusion)






          share|improve this answer

























          • I tried that, did not work get error Notice: Array to string conversion taking a look at vendormagentomodule-backendBlockWidgetFormElementDependence.php the first dependency gets overwritten by the seconed if a separe it $this->_depends[$fieldName][$fieldNameFrom] = $refField;

            – Gianni Di Falco
            May 31 '16 at 6:57











          • Wow ty for your interest, have not tried it yet but it seems it may work

            – Gianni Di Falco
            Jun 13 '16 at 6:49















          1














          Edit



          This seem to be an issue in Magento2, one possible workaround is



          In your construct inject FieldFactory and also create a protected var for _fieldFactory



          public function __construct(
          ......
          MagentoConfigModelConfigStructureElementDependencyFieldFactory $fieldFactory,
          ......
          )
          ....
          $this->_fieldFactory = $fieldFactory;
          ....



          Then update your existing code to



          $refField = $this->_fieldFactory->create(
          ['fieldData' => ['value' => 'dependecy 1,dependecy 2', 'separator' => ','], 'fieldPrefix' => '']
          );


          ->addFieldDependence
          (
          $field_to_show->getName(),
          $field_to_evaluate->getName(),
          $refField
          )


          I created an issue for this at https://github.com/magento/magento2/issues/4796



          Try



          ->addFieldMap($field_to_evaluate->getHtmlId(), $field_to_evaluate->getName())
          ->addFieldMap($field_to_show->getHtmlId(), $field_to_show->getName())
          ->addFieldDependence
          (
          $field_to_show->getName(),
          $field_to_evaluate->getName(),
          array('dependecy 1','dependecy 2')
          )


          To hide the field by default, you should set the default selected value of that option to the option that would trigger it to hide (to prevent any UI confusion)






          share|improve this answer

























          • I tried that, did not work get error Notice: Array to string conversion taking a look at vendormagentomodule-backendBlockWidgetFormElementDependence.php the first dependency gets overwritten by the seconed if a separe it $this->_depends[$fieldName][$fieldNameFrom] = $refField;

            – Gianni Di Falco
            May 31 '16 at 6:57











          • Wow ty for your interest, have not tried it yet but it seems it may work

            – Gianni Di Falco
            Jun 13 '16 at 6:49













          1












          1








          1







          Edit



          This seem to be an issue in Magento2, one possible workaround is



          In your construct inject FieldFactory and also create a protected var for _fieldFactory



          public function __construct(
          ......
          MagentoConfigModelConfigStructureElementDependencyFieldFactory $fieldFactory,
          ......
          )
          ....
          $this->_fieldFactory = $fieldFactory;
          ....



          Then update your existing code to



          $refField = $this->_fieldFactory->create(
          ['fieldData' => ['value' => 'dependecy 1,dependecy 2', 'separator' => ','], 'fieldPrefix' => '']
          );


          ->addFieldDependence
          (
          $field_to_show->getName(),
          $field_to_evaluate->getName(),
          $refField
          )


          I created an issue for this at https://github.com/magento/magento2/issues/4796



          Try



          ->addFieldMap($field_to_evaluate->getHtmlId(), $field_to_evaluate->getName())
          ->addFieldMap($field_to_show->getHtmlId(), $field_to_show->getName())
          ->addFieldDependence
          (
          $field_to_show->getName(),
          $field_to_evaluate->getName(),
          array('dependecy 1','dependecy 2')
          )


          To hide the field by default, you should set the default selected value of that option to the option that would trigger it to hide (to prevent any UI confusion)






          share|improve this answer















          Edit



          This seem to be an issue in Magento2, one possible workaround is



          In your construct inject FieldFactory and also create a protected var for _fieldFactory



          public function __construct(
          ......
          MagentoConfigModelConfigStructureElementDependencyFieldFactory $fieldFactory,
          ......
          )
          ....
          $this->_fieldFactory = $fieldFactory;
          ....



          Then update your existing code to



          $refField = $this->_fieldFactory->create(
          ['fieldData' => ['value' => 'dependecy 1,dependecy 2', 'separator' => ','], 'fieldPrefix' => '']
          );


          ->addFieldDependence
          (
          $field_to_show->getName(),
          $field_to_evaluate->getName(),
          $refField
          )


          I created an issue for this at https://github.com/magento/magento2/issues/4796



          Try



          ->addFieldMap($field_to_evaluate->getHtmlId(), $field_to_evaluate->getName())
          ->addFieldMap($field_to_show->getHtmlId(), $field_to_show->getName())
          ->addFieldDependence
          (
          $field_to_show->getName(),
          $field_to_evaluate->getName(),
          array('dependecy 1','dependecy 2')
          )


          To hide the field by default, you should set the default selected value of that option to the option that would trigger it to hide (to prevent any UI confusion)







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited May 31 '16 at 13:44

























          answered May 30 '16 at 18:29









          Renon StewartRenon Stewart

          12.1k12044




          12.1k12044












          • I tried that, did not work get error Notice: Array to string conversion taking a look at vendormagentomodule-backendBlockWidgetFormElementDependence.php the first dependency gets overwritten by the seconed if a separe it $this->_depends[$fieldName][$fieldNameFrom] = $refField;

            – Gianni Di Falco
            May 31 '16 at 6:57











          • Wow ty for your interest, have not tried it yet but it seems it may work

            – Gianni Di Falco
            Jun 13 '16 at 6:49

















          • I tried that, did not work get error Notice: Array to string conversion taking a look at vendormagentomodule-backendBlockWidgetFormElementDependence.php the first dependency gets overwritten by the seconed if a separe it $this->_depends[$fieldName][$fieldNameFrom] = $refField;

            – Gianni Di Falco
            May 31 '16 at 6:57











          • Wow ty for your interest, have not tried it yet but it seems it may work

            – Gianni Di Falco
            Jun 13 '16 at 6:49
















          I tried that, did not work get error Notice: Array to string conversion taking a look at vendormagentomodule-backendBlockWidgetFormElementDependence.php the first dependency gets overwritten by the seconed if a separe it $this->_depends[$fieldName][$fieldNameFrom] = $refField;

          – Gianni Di Falco
          May 31 '16 at 6:57





          I tried that, did not work get error Notice: Array to string conversion taking a look at vendormagentomodule-backendBlockWidgetFormElementDependence.php the first dependency gets overwritten by the seconed if a separe it $this->_depends[$fieldName][$fieldNameFrom] = $refField;

          – Gianni Di Falco
          May 31 '16 at 6:57













          Wow ty for your interest, have not tried it yet but it seems it may work

          – Gianni Di Falco
          Jun 13 '16 at 6:49





          Wow ty for your interest, have not tried it yet but it seems it may work

          – Gianni Di Falco
          Jun 13 '16 at 6:49













          -1














          $refField = $this->_fieldFactory->create(['fieldData' => ['value' => '1,2', 'separator' => ','], 'fieldPrefix' => '']
          );



           $this->setChild('form_after', $this->getLayout()->createBlock(
          'MagentoBackendBlockWidgetFormElementDependence')
          ->addFieldMap($action->getHtmlId(), $action->getName())
          ->addFieldMap($anotherFieldweb->getHtmlId(), $anotherFieldweb->getName())
          ->addFieldMap($anotherFieldstore->getHtmlId(), $anotherFieldstore->getName())
          ->addFieldMap($anotherFieldhideorders->getHtmlId(), $anotherFieldhideorders->getName())
          ->addFieldMap($anotherFieldhideinvoice->getHtmlId(), $anotherFieldhideinvoice->getName())
          ->addFieldMap($anotherFieldhideshipment->getHtmlId(), $anotherFieldhideshipment->getName())
          ->addFieldMap($anotherFieldhidecredit->getHtmlId(), $anotherFieldhidecredit->getName())

          ->addFieldDependence($anotherFieldweb->getName(),$action->getName(),1)
          ->addFieldDependence($anotherFieldstore->getName(),$action->getName(),2)
          ->addFieldDependence($anotherFieldhideorders->getName(),$action->getName(),$refField)
          ->addFieldDependence($anotherFieldhideinvoice->getName(),$action->getName(),$refField)
          ->addFieldDependence($anotherFieldhideshipment->getName(),$action->getName(),$refField)
          ->addFieldDependence($anotherFieldhidecredit->getName(),$action->getName(),$refField)
          );




          share








          New contributor




          milan Thakkar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.




















          • This is perfect solution

            – milan Thakkar
            3 mins ago















          -1














          $refField = $this->_fieldFactory->create(['fieldData' => ['value' => '1,2', 'separator' => ','], 'fieldPrefix' => '']
          );



           $this->setChild('form_after', $this->getLayout()->createBlock(
          'MagentoBackendBlockWidgetFormElementDependence')
          ->addFieldMap($action->getHtmlId(), $action->getName())
          ->addFieldMap($anotherFieldweb->getHtmlId(), $anotherFieldweb->getName())
          ->addFieldMap($anotherFieldstore->getHtmlId(), $anotherFieldstore->getName())
          ->addFieldMap($anotherFieldhideorders->getHtmlId(), $anotherFieldhideorders->getName())
          ->addFieldMap($anotherFieldhideinvoice->getHtmlId(), $anotherFieldhideinvoice->getName())
          ->addFieldMap($anotherFieldhideshipment->getHtmlId(), $anotherFieldhideshipment->getName())
          ->addFieldMap($anotherFieldhidecredit->getHtmlId(), $anotherFieldhidecredit->getName())

          ->addFieldDependence($anotherFieldweb->getName(),$action->getName(),1)
          ->addFieldDependence($anotherFieldstore->getName(),$action->getName(),2)
          ->addFieldDependence($anotherFieldhideorders->getName(),$action->getName(),$refField)
          ->addFieldDependence($anotherFieldhideinvoice->getName(),$action->getName(),$refField)
          ->addFieldDependence($anotherFieldhideshipment->getName(),$action->getName(),$refField)
          ->addFieldDependence($anotherFieldhidecredit->getName(),$action->getName(),$refField)
          );




          share








          New contributor




          milan Thakkar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.




















          • This is perfect solution

            – milan Thakkar
            3 mins ago













          -1












          -1








          -1







          $refField = $this->_fieldFactory->create(['fieldData' => ['value' => '1,2', 'separator' => ','], 'fieldPrefix' => '']
          );



           $this->setChild('form_after', $this->getLayout()->createBlock(
          'MagentoBackendBlockWidgetFormElementDependence')
          ->addFieldMap($action->getHtmlId(), $action->getName())
          ->addFieldMap($anotherFieldweb->getHtmlId(), $anotherFieldweb->getName())
          ->addFieldMap($anotherFieldstore->getHtmlId(), $anotherFieldstore->getName())
          ->addFieldMap($anotherFieldhideorders->getHtmlId(), $anotherFieldhideorders->getName())
          ->addFieldMap($anotherFieldhideinvoice->getHtmlId(), $anotherFieldhideinvoice->getName())
          ->addFieldMap($anotherFieldhideshipment->getHtmlId(), $anotherFieldhideshipment->getName())
          ->addFieldMap($anotherFieldhidecredit->getHtmlId(), $anotherFieldhidecredit->getName())

          ->addFieldDependence($anotherFieldweb->getName(),$action->getName(),1)
          ->addFieldDependence($anotherFieldstore->getName(),$action->getName(),2)
          ->addFieldDependence($anotherFieldhideorders->getName(),$action->getName(),$refField)
          ->addFieldDependence($anotherFieldhideinvoice->getName(),$action->getName(),$refField)
          ->addFieldDependence($anotherFieldhideshipment->getName(),$action->getName(),$refField)
          ->addFieldDependence($anotherFieldhidecredit->getName(),$action->getName(),$refField)
          );




          share








          New contributor




          milan Thakkar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.










          $refField = $this->_fieldFactory->create(['fieldData' => ['value' => '1,2', 'separator' => ','], 'fieldPrefix' => '']
          );



           $this->setChild('form_after', $this->getLayout()->createBlock(
          'MagentoBackendBlockWidgetFormElementDependence')
          ->addFieldMap($action->getHtmlId(), $action->getName())
          ->addFieldMap($anotherFieldweb->getHtmlId(), $anotherFieldweb->getName())
          ->addFieldMap($anotherFieldstore->getHtmlId(), $anotherFieldstore->getName())
          ->addFieldMap($anotherFieldhideorders->getHtmlId(), $anotherFieldhideorders->getName())
          ->addFieldMap($anotherFieldhideinvoice->getHtmlId(), $anotherFieldhideinvoice->getName())
          ->addFieldMap($anotherFieldhideshipment->getHtmlId(), $anotherFieldhideshipment->getName())
          ->addFieldMap($anotherFieldhidecredit->getHtmlId(), $anotherFieldhidecredit->getName())

          ->addFieldDependence($anotherFieldweb->getName(),$action->getName(),1)
          ->addFieldDependence($anotherFieldstore->getName(),$action->getName(),2)
          ->addFieldDependence($anotherFieldhideorders->getName(),$action->getName(),$refField)
          ->addFieldDependence($anotherFieldhideinvoice->getName(),$action->getName(),$refField)
          ->addFieldDependence($anotherFieldhideshipment->getName(),$action->getName(),$refField)
          ->addFieldDependence($anotherFieldhidecredit->getName(),$action->getName(),$refField)
          );





          share








          New contributor




          milan Thakkar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.








          share


          share






          New contributor




          milan Thakkar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.









          answered 3 mins ago









          milan Thakkarmilan Thakkar

          1




          1




          New contributor




          milan Thakkar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.





          New contributor





          milan Thakkar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.






          milan Thakkar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.












          • This is perfect solution

            – milan Thakkar
            3 mins ago

















          • This is perfect solution

            – milan Thakkar
            3 mins ago
















          This is perfect solution

          – milan Thakkar
          3 mins ago





          This is perfect solution

          – milan Thakkar
          3 mins ago

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Magento Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f117570%2fmagento-2-two-dependencies-in-one-field-form%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Magento 2 duplicate PHPSESSID cookie when using session_start() in custom php scriptMagento 2: User cant logged in into to account page, no error showing!Magento duplicate on subdomainGrabbing storeview from cookie (after using language selector)How do I run php custom script on magento2Magento 2: Include PHP script in headerSession lock after using Cm_RedisSessionscript php to update stockMagento set cookie popupMagento 2 session id cookie - where to find it?How to import Configurable product from csv with custom attributes using php scriptMagento 2 run custom PHP script

          Can not update quote_id field of “quote_item” table magento 2Magento 2.1 - We can't remove the item. (Shopping Cart doesnt allow us to remove items before becomes empty)Add value for custom quote item attribute using REST apiREST API endpoint v1/carts/cartId/items always returns error messageCorrect way to save entries to databaseHow to remove all associated quote objects of a customer completelyMagento 2 - Save value from custom input field to quote_itemGet quote_item data using quote id and product id filter in Magento 2How to set additional data to quote_item table from controller in Magento 2?What is the purpose of additional_data column in quote_item table in magento2Set Custom Price to Quote item magento2 from controller

          How to solve knockout JS error in Magento 2 Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?(Magento2) knockout.js:3012 Uncaught ReferenceError: Unable to process bindingUnable to process binding Knockout.js magento 2Cannot read property `scopeLabel` of undefined on Product Detail PageCan't get Customer Data on frontend in Magento 2Magento2 Order Summary - unable to process bindingKO templates are not loading in Magento 2.1 applicationgetting knockout js error magento 2Product grid not load -— Unable to process binding Knockout.js magento 2Product form not loaded in magento2Uncaught ReferenceError: Unable to process binding “if: function()return (isShowLegend()) ” magento 2