Magento 2 How can I add unit of the data in the ui form field? Planned maintenance scheduled...

Do I really need recursive chmod to restrict access to a folder?

Why did the rest of the Eastern Bloc not invade Yugoslavia?

What is a non-alternating simple group with big order, but relatively few conjugacy classes?

In predicate logic, does existential quantification (∃) include universal quantification (∀), i.e. can 'some' imply 'all'?

Why are there no cargo aircraft with "flying wing" design?

List of Python versions

How do I keep my slimes from escaping their pens?

Apollo command module space walk?

List *all* the tuples!

How to find out what spells would be useless to a blind NPC spellcaster?

Why did the IBM 650 use bi-quinary?

Should I use a zero-interest credit card for a large one-time purchase?

How discoverable are IPv6 addresses and AAAA names by potential attackers?

What's the meaning of 間時肆拾貳 at a car parking sign

Why do people hide their license plates in the EU?

Is the Standard Deduction better than Itemized when both are the same amount?

How does debian/ubuntu knows a package has a updated version

Should I discuss the type of campaign with my players?

The logistics of corpse disposal

Dating a Former Employee

Resolving to minmaj7

How to find all the available tools in mac terminal?

How to align text above triangle figure

Can I cast Passwall to drop an enemy into a 20-foot pit?



Magento 2 How can I add unit of the data in the ui form field?



Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?How can i rewrite TierPrice Block in Magento2How can I add a custom field to an admin form in Magento 2?Magento 2 : How can I upload files of dynamically added file input fields in the adminHow can we validate individual form field In Magento 2?Magento 2: How add only label field in Ui form?Magento 2 Add new field to Magento_User admin formHow Do we can give dynamic data for a form field in admin form(ui-component) in magento 2Magento 2.2.5 : Add custom field in product attribute add formMagento 2.2.6 : Add custom field in product attribute add form - Is not render the database value on editMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







5















I need to indicate the user that the “unit” of the data to be input, such as currency.



enter image description here



I am using ui component form. How can I achieve it?



Here is my code



<field name="total">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="label" xsi:type="string">Amount</item>
<item name="visible" xsi:type="boolean">true</item>
<item name="dataType" xsi:type="string">text</item>
<item name="disabled" xsi:type="boolean">true</item>
<item name="formElement" xsi:type="string">input</item>
<item name="source" xsi:type="string">total</item>
<item name="validation" xsi:type="array">
<item name="required-entry" xsi:type="boolean">true</item>
</item>
</item>
</argument>
</field>









share|improve this question































    5















    I need to indicate the user that the “unit” of the data to be input, such as currency.



    enter image description here



    I am using ui component form. How can I achieve it?



    Here is my code



    <field name="total">
    <argument name="data" xsi:type="array">
    <item name="config" xsi:type="array">
    <item name="label" xsi:type="string">Amount</item>
    <item name="visible" xsi:type="boolean">true</item>
    <item name="dataType" xsi:type="string">text</item>
    <item name="disabled" xsi:type="boolean">true</item>
    <item name="formElement" xsi:type="string">input</item>
    <item name="source" xsi:type="string">total</item>
    <item name="validation" xsi:type="array">
    <item name="required-entry" xsi:type="boolean">true</item>
    </item>
    </item>
    </argument>
    </field>









    share|improve this question



























      5












      5








      5








      I need to indicate the user that the “unit” of the data to be input, such as currency.



      enter image description here



      I am using ui component form. How can I achieve it?



      Here is my code



      <field name="total">
      <argument name="data" xsi:type="array">
      <item name="config" xsi:type="array">
      <item name="label" xsi:type="string">Amount</item>
      <item name="visible" xsi:type="boolean">true</item>
      <item name="dataType" xsi:type="string">text</item>
      <item name="disabled" xsi:type="boolean">true</item>
      <item name="formElement" xsi:type="string">input</item>
      <item name="source" xsi:type="string">total</item>
      <item name="validation" xsi:type="array">
      <item name="required-entry" xsi:type="boolean">true</item>
      </item>
      </item>
      </argument>
      </field>









      share|improve this question
















      I need to indicate the user that the “unit” of the data to be input, such as currency.



      enter image description here



      I am using ui component form. How can I achieve it?



      Here is my code



      <field name="total">
      <argument name="data" xsi:type="array">
      <item name="config" xsi:type="array">
      <item name="label" xsi:type="string">Amount</item>
      <item name="visible" xsi:type="boolean">true</item>
      <item name="dataType" xsi:type="string">text</item>
      <item name="disabled" xsi:type="boolean">true</item>
      <item name="formElement" xsi:type="string">input</item>
      <item name="source" xsi:type="string">total</item>
      <item name="validation" xsi:type="array">
      <item name="required-entry" xsi:type="boolean">true</item>
      </item>
      </item>
      </argument>
      </field>






      magento2 price currency ui-form custom-field






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 17 '18 at 11:53









      Teja Bhagavan Kollepara

      2,99841949




      2,99841949










      asked Jan 5 '17 at 7:21









      Jancy AbrahamJancy Abraham

      1,12611638




      1,12611638






















          1 Answer
          1






          active

          oldest

          votes


















          0














          You can add "addbefore" attribute to your UI component form field.

          Follow this code:



          <field name="xxxxx"  sortOrder="50" >
          <argument name="data" xsi:type="array">
          <item name="config" xsi:type="array">
          <item name="dataType" xsi:type="string">text</item>
          <item name="label" xsi:type="string" translate="true">xxxxx xxxxx</item>
          <item name="formElement" xsi:type="string">input</item>
          <item name="source" xsi:type="string">ordercombine</item>
          <item name="dataScope" xsi:type="string">xxxxx</item>
          <item name="default" xsi:type="string">1</item>
          <item name="addbefore" xsi:type="string">$</item>
          </item>
          </argument>
          </field>





          share|improve this answer


























            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%2f153225%2fmagento-2-how-can-i-add-unit-of-the-data-in-the-ui-form-field%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            You can add "addbefore" attribute to your UI component form field.

            Follow this code:



            <field name="xxxxx"  sortOrder="50" >
            <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
            <item name="dataType" xsi:type="string">text</item>
            <item name="label" xsi:type="string" translate="true">xxxxx xxxxx</item>
            <item name="formElement" xsi:type="string">input</item>
            <item name="source" xsi:type="string">ordercombine</item>
            <item name="dataScope" xsi:type="string">xxxxx</item>
            <item name="default" xsi:type="string">1</item>
            <item name="addbefore" xsi:type="string">$</item>
            </item>
            </argument>
            </field>





            share|improve this answer






























              0














              You can add "addbefore" attribute to your UI component form field.

              Follow this code:



              <field name="xxxxx"  sortOrder="50" >
              <argument name="data" xsi:type="array">
              <item name="config" xsi:type="array">
              <item name="dataType" xsi:type="string">text</item>
              <item name="label" xsi:type="string" translate="true">xxxxx xxxxx</item>
              <item name="formElement" xsi:type="string">input</item>
              <item name="source" xsi:type="string">ordercombine</item>
              <item name="dataScope" xsi:type="string">xxxxx</item>
              <item name="default" xsi:type="string">1</item>
              <item name="addbefore" xsi:type="string">$</item>
              </item>
              </argument>
              </field>





              share|improve this answer




























                0












                0








                0







                You can add "addbefore" attribute to your UI component form field.

                Follow this code:



                <field name="xxxxx"  sortOrder="50" >
                <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                <item name="dataType" xsi:type="string">text</item>
                <item name="label" xsi:type="string" translate="true">xxxxx xxxxx</item>
                <item name="formElement" xsi:type="string">input</item>
                <item name="source" xsi:type="string">ordercombine</item>
                <item name="dataScope" xsi:type="string">xxxxx</item>
                <item name="default" xsi:type="string">1</item>
                <item name="addbefore" xsi:type="string">$</item>
                </item>
                </argument>
                </field>





                share|improve this answer















                You can add "addbefore" attribute to your UI component form field.

                Follow this code:



                <field name="xxxxx"  sortOrder="50" >
                <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                <item name="dataType" xsi:type="string">text</item>
                <item name="label" xsi:type="string" translate="true">xxxxx xxxxx</item>
                <item name="formElement" xsi:type="string">input</item>
                <item name="source" xsi:type="string">ordercombine</item>
                <item name="dataScope" xsi:type="string">xxxxx</item>
                <item name="default" xsi:type="string">1</item>
                <item name="addbefore" xsi:type="string">$</item>
                </item>
                </argument>
                </field>






                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited 8 mins ago









                magefms

                2,7052528




                2,7052528










                answered 13 mins ago









                the lightthe light

                465




                465






























                    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%2f153225%2fmagento-2-how-can-i-add-unit-of-the-data-in-the-ui-form-field%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

                    “%fieldName is a required field.”, in Magento2 REST API Call for GET Method Type The Next...

                    How to change City field to a dropdown in Checkout step Magento 2Magento 2 : How to change UI field(s)...

                    夢乃愛華...