Custom Widget with 2 conditionsDynamic Widget ParametersCreate Widget not listed under Widget InstancesWYSIWYG in custom widgetproblem with new widgetcreate date and time attribute for product in magento 2Magento 2 Widget With Image ChooserMagento 2.1.4 - List of products which have special price with widget conditionsForm is not displayed on panel admin Magento 2Widget conditions are looking weird in the editorHow to create a custom Widget with custom conditions

Would a high gravity rocky planet be guaranteed to have an atmosphere?

How can I kill an app using Terminal?

Method to test if a number is a perfect power?

Gears on left are inverse to gears on right?

How long to clear the 'suck zone' of a turbofan after start is initiated?

Avoiding estate tax by giving multiple gifts

What is the intuitive meaning of having a linear relationship between the logs of two variables?

How does Loki do this?

I'm in charge of equipment buying but no one's ever happy with what I choose. How to fix this?

How do scammers retract money, while you can’t?

Opposite of a diet

How to Reset Passwords on Multiple Websites Easily?

How does it work when somebody invests in my business?

How do I find the solutions of the following equation?

How do we know the LHC results are robust?

Is there a problem with hiding "forgot password" until it's needed?

What is the difference between "behavior" and "behaviour"?

Why escape if the_content isnt?

Implement the Thanos sorting algorithm

For a non-Jew, is there a punishment for not observing the 7 Noahide Laws?

How to check is there any negative term in a large list?

Why didn't Theresa May consult with Parliament before negotiating a deal with the EU?

Do the temporary hit points from Reckless Abandon stack if I make multiple attacks on my turn?

Customer Requests (Sometimes) Drive Me Bonkers!



Custom Widget with 2 conditions


Dynamic Widget ParametersCreate Widget not listed under Widget InstancesWYSIWYG in custom widgetproblem with new widgetcreate date and time attribute for product in magento 2Magento 2 Widget With Image ChooserMagento 2.1.4 - List of products which have special price with widget conditionsForm is not displayed on panel admin Magento 2Widget conditions are looking weird in the editorHow to create a custom Widget with custom conditions













1















I'm attempting to build a widget that allows the customer to build product tabs.



I'm using conditions to allow the user to filter on products (using the core CatalogWidget conditions block)



Widget.xml:



<parameter name="condition_1" xsi:type="conditions" visible="true" required="true" sort_order="10" class="MagentoCatalogWidgetBlockProductWidgetConditions">
<label translate="true">Conditions</label>
</parameter>
<parameter name="condition_2" xsi:type="conditions" visible="true" required="true" sort_order="10" class="MagentoCatalogWidgetBlockProductWidgetConditions">
<label translate="true">Conditions</label>
</parameter>


When I add 2 conditions like this to my widget.xml, I receive the following error in system.log:




[2019-03-26 09:44:55] main.CRITICAL: An element with a
"conditions__1__type" ID already exists. [] []




I've attempted to amend the elementId using a custom Conditions class and amending the output html like:



public function getInputHtml()

$this->input = $this->elementFactory->create('text');
$this->input->setRule($this->rule)->setRenderer($this->conditions);
$this->input->setId($this->element->getId());
return $this->input->toHtml();










share|improve this question









New contributor




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
























    1















    I'm attempting to build a widget that allows the customer to build product tabs.



    I'm using conditions to allow the user to filter on products (using the core CatalogWidget conditions block)



    Widget.xml:



    <parameter name="condition_1" xsi:type="conditions" visible="true" required="true" sort_order="10" class="MagentoCatalogWidgetBlockProductWidgetConditions">
    <label translate="true">Conditions</label>
    </parameter>
    <parameter name="condition_2" xsi:type="conditions" visible="true" required="true" sort_order="10" class="MagentoCatalogWidgetBlockProductWidgetConditions">
    <label translate="true">Conditions</label>
    </parameter>


    When I add 2 conditions like this to my widget.xml, I receive the following error in system.log:




    [2019-03-26 09:44:55] main.CRITICAL: An element with a
    "conditions__1__type" ID already exists. [] []




    I've attempted to amend the elementId using a custom Conditions class and amending the output html like:



    public function getInputHtml()

    $this->input = $this->elementFactory->create('text');
    $this->input->setRule($this->rule)->setRenderer($this->conditions);
    $this->input->setId($this->element->getId());
    return $this->input->toHtml();










    share|improve this question









    New contributor




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






















      1












      1








      1








      I'm attempting to build a widget that allows the customer to build product tabs.



      I'm using conditions to allow the user to filter on products (using the core CatalogWidget conditions block)



      Widget.xml:



      <parameter name="condition_1" xsi:type="conditions" visible="true" required="true" sort_order="10" class="MagentoCatalogWidgetBlockProductWidgetConditions">
      <label translate="true">Conditions</label>
      </parameter>
      <parameter name="condition_2" xsi:type="conditions" visible="true" required="true" sort_order="10" class="MagentoCatalogWidgetBlockProductWidgetConditions">
      <label translate="true">Conditions</label>
      </parameter>


      When I add 2 conditions like this to my widget.xml, I receive the following error in system.log:




      [2019-03-26 09:44:55] main.CRITICAL: An element with a
      "conditions__1__type" ID already exists. [] []




      I've attempted to amend the elementId using a custom Conditions class and amending the output html like:



      public function getInputHtml()

      $this->input = $this->elementFactory->create('text');
      $this->input->setRule($this->rule)->setRenderer($this->conditions);
      $this->input->setId($this->element->getId());
      return $this->input->toHtml();










      share|improve this question









      New contributor




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












      I'm attempting to build a widget that allows the customer to build product tabs.



      I'm using conditions to allow the user to filter on products (using the core CatalogWidget conditions block)



      Widget.xml:



      <parameter name="condition_1" xsi:type="conditions" visible="true" required="true" sort_order="10" class="MagentoCatalogWidgetBlockProductWidgetConditions">
      <label translate="true">Conditions</label>
      </parameter>
      <parameter name="condition_2" xsi:type="conditions" visible="true" required="true" sort_order="10" class="MagentoCatalogWidgetBlockProductWidgetConditions">
      <label translate="true">Conditions</label>
      </parameter>


      When I add 2 conditions like this to my widget.xml, I receive the following error in system.log:




      [2019-03-26 09:44:55] main.CRITICAL: An element with a
      "conditions__1__type" ID already exists. [] []




      I've attempted to amend the elementId using a custom Conditions class and amending the output html like:



      public function getInputHtml()

      $this->input = $this->elementFactory->create('text');
      $this->input->setRule($this->rule)->setRenderer($this->conditions);
      $this->input->setId($this->element->getId());
      return $this->input->toHtml();







      magento-2.1 admin widgets






      share|improve this question









      New contributor




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











      share|improve this question









      New contributor




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









      share|improve this question




      share|improve this question








      edited yesterday









      ARUNPRABAKARAN M

      318111




      318111






      New contributor




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









      asked yesterday









      itdevitdev

      62




      62




      New contributor




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





      New contributor





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






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




















          0






          active

          oldest

          votes











          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
          );



          );






          itdev is a new contributor. Be nice, and check out our Code of Conduct.









          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f267405%2fcustom-widget-with-2-conditions%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          itdev is a new contributor. Be nice, and check out our Code of Conduct.









          draft saved

          draft discarded


















          itdev is a new contributor. Be nice, and check out our Code of Conduct.












          itdev is a new contributor. Be nice, and check out our Code of Conduct.











          itdev is a new contributor. Be nice, and check out our Code of Conduct.














          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%2f267405%2fcustom-widget-with-2-conditions%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

          Sum ergo cogito? 1 nng

          419 nièngy_Soadمي 19bal1.5o_g

          Queiggey Chernihivv 9NnOo i Zw X QqKk LpB