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?
3 doors, three guards, one stone
Is the Standard Deduction better than Itemized when both are the same amount?
Seeking colloquialism for “just because”
How do pianists reach extremely loud dynamics?
Why am I getting the error "non-boolean type specified in a context where a condition is expected" for this request?
How can I make names more distinctive without making them longer?
How widely used is the term Treppenwitz? Is it something that most Germans know?
Resolving to minmaj7
Short Story with Cinderella as a Voo-doo Witch
Can a non-EU citizen traveling with me come with me through the EU passport line?
How do I keep my slimes from escaping their pens?
How to deal with a team lead who never gives me credit?
Why do we bend a book to keep it straight?
Can an alien society believe that their star system is the universe?
Why are there no cargo aircraft with "flying wing" design?
Is it ethical to give a final exam after the professor has quit before teaching the remaining chapters of the course?
Do I really need recursive chmod to restrict access to a folder?
Why are Kinder Surprise Eggs illegal in the USA?
Should I discuss the type of campaign with my players?
Identify plant with long narrow paired leaves and reddish stems
What does this icon in iOS Stardew Valley mean?
porting install scripts : can rpm replace apt?
Bete Noir -- no dairy
Apollo command module space walk?
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;
I need to indicate the user that the “unit” of the data to be input, such as currency.
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
add a comment |
I need to indicate the user that the “unit” of the data to be input, such as currency.
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
add a comment |
I need to indicate the user that the “unit” of the data to be input, such as currency.
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
I need to indicate the user that the “unit” of the data to be input, such as currency.
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
magento2 price currency ui-form custom-field
edited Mar 17 '18 at 11:53
![](https://i.stack.imgur.com/qUGVv.jpg?s=32&g=1)
![](https://i.stack.imgur.com/qUGVv.jpg?s=32&g=1)
Teja Bhagavan Kollepara
2,99841949
2,99841949
asked Jan 5 '17 at 7:21
Jancy AbrahamJancy Abraham
1,12111638
1,12111638
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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>
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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>
add a comment |
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>
add a comment |
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>
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>
edited 3 mins ago
![](https://i.stack.imgur.com/nVBxY.png?s=32&g=1)
![](https://i.stack.imgur.com/nVBxY.png?s=32&g=1)
magefms
2,7052528
2,7052528
answered 8 mins ago
![](https://lh6.googleusercontent.com/-FBoU6I2s4dQ/AAAAAAAAAAI/AAAAAAAAAAA/AKxrwcYAx7zqsJXfoAd_W_CpXyFac1BETg/mo/photo.jpg?sz=32)
![](https://lh6.googleusercontent.com/-FBoU6I2s4dQ/AAAAAAAAAAI/AAAAAAAAAAA/AKxrwcYAx7zqsJXfoAd_W_CpXyFac1BETg/mo/photo.jpg?sz=32)
the lightthe light
465
465
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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