Product Form with Custom Datasource not showing default values except image of product in magneto 2 Admin
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
0
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="provider" xsi:type="string">product_form.gift_form_data_source</item>
<item name="namespace" xsi:type="string">gift_form</item>
</item>
<item name="template"
xsi:type="string">templates/form/collapsible</item>
</argument>
<settings>
<deps>
<dep>product_form.gift_form_data_source</dep>
</deps>
</settings>
<dataSource name="gift_form_data_source">
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="component"
xsi:type="string">Magento_Ui/js/form/provider</item>
</item>
</argument>
<dataProvider
class="
NamespaceProducttypeUiDataProviderProductFormGiftAmountDataProvider"
name="gift_form_data_source">
<settings>
<requestFieldName>id</requestFieldName>
<primaryFieldName>card_amount_productid</primaryFieldName>
</settings>
</dataProvider>
</dataSource>
<fieldset name="dynamic_rows_set">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="label" xsi:type="string" translate="true">Gift
Card Price Settings</item>
<item name="collapsible" xsi:type="boolean">true</item>
<item name="sortOrder" xsi:type="number">4</item>
</item>
</argument>
<container name="dynamic_rows_container">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/dynamic-rows/dynamic-rows</item>
<item name="template" xsi:type="string">ui/dynamic-rows/templates/default</item>
<item name="componentType" xsi:type="string">dynamicRows</item>
<item name="recordTemplate" xsi:type="string">record</item>
<item name="addButtonLabel" xsi:type="string">Add New</item>
<item name="deleteProperty" xsi:type="boolean">false</item>
</item>
</argument>
<container name="record">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="label" xsi:type="string" translate="true">Gift Card Price Settings</item>
<item name="component" xsi:type="string" translate="true">Magento_Ui/js/dynamic-rows/record</item>
<item name="isTemplate" xsi:type="boolean">true</item>
<item name="is_collection" xsi:type="boolean">true</item>
<item name="showFallbackReset" xsi:type="boolean">false</item>
</item>
</argument>
<field name="card_amount_value">
<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">Amount</item>
<item name="formElement" xsi:type="string">input</item>
<item name="showFallbackReset" xsi:type="boolean">false</item>
<item name="validation" xsi:type="array">
<item name="required-entry" xsi:type="boolean">true</item>
</item>
<item name="sortOrder" xsi:type="string">10</item>
</item>
</argument>
</field>
<actionDelete>
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="componentType" xsi:type="string">actionDelete</item>
<item name="dataType" xsi:type="string">text</item>
<item name="fit" xsi:type="boolean">false</item>
<item name="label" xsi:type="string">Actions</item>
<item name="additionalClasses" xsi:type="string">data-grid-actions-cell</item>
<item name="template" xsi:type="string">Magento_Backend/dynamic-rows/cells/action-delete</item>
</item>
</argument>
</actionDelete>
</container>
</container>
</fieldset>
</form>
magento2 xml admin-panel
New contributor
add a comment |
0
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="provider" xsi:type="string">product_form.gift_form_data_source</item>
<item name="namespace" xsi:type="string">gift_form</item>
</item>
<item name="template"
xsi:type="string">templates/form/collapsible</item>
</argument>
<settings>
<deps>
<dep>product_form.gift_form_data_source</dep>
</deps>
</settings>
<dataSource name="gift_form_data_source">
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="component"
xsi:type="string">Magento_Ui/js/form/provider</item>
</item>
</argument>
<dataProvider
class="
NamespaceProducttypeUiDataProviderProductFormGiftAmountDataProvider"
name="gift_form_data_source">
<settings>
<requestFieldName>id</requestFieldName>
<primaryFieldName>card_amount_productid</primaryFieldName>
</settings>
</dataProvider>
</dataSource>
<fieldset name="dynamic_rows_set">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="label" xsi:type="string" translate="true">Gift
Card Price Settings</item>
<item name="collapsible" xsi:type="boolean">true</item>
<item name="sortOrder" xsi:type="number">4</item>
</item>
</argument>
<container name="dynamic_rows_container">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/dynamic-rows/dynamic-rows</item>
<item name="template" xsi:type="string">ui/dynamic-rows/templates/default</item>
<item name="componentType" xsi:type="string">dynamicRows</item>
<item name="recordTemplate" xsi:type="string">record</item>
<item name="addButtonLabel" xsi:type="string">Add New</item>
<item name="deleteProperty" xsi:type="boolean">false</item>
</item>
</argument>
<container name="record">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="label" xsi:type="string" translate="true">Gift Card Price Settings</item>
<item name="component" xsi:type="string" translate="true">Magento_Ui/js/dynamic-rows/record</item>
<item name="isTemplate" xsi:type="boolean">true</item>
<item name="is_collection" xsi:type="boolean">true</item>
<item name="showFallbackReset" xsi:type="boolean">false</item>
</item>
</argument>
<field name="card_amount_value">
<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">Amount</item>
<item name="formElement" xsi:type="string">input</item>
<item name="showFallbackReset" xsi:type="boolean">false</item>
<item name="validation" xsi:type="array">
<item name="required-entry" xsi:type="boolean">true</item>
</item>
<item name="sortOrder" xsi:type="string">10</item>
</item>
</argument>
</field>
<actionDelete>
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="componentType" xsi:type="string">actionDelete</item>
<item name="dataType" xsi:type="string">text</item>
<item name="fit" xsi:type="boolean">false</item>
<item name="label" xsi:type="string">Actions</item>
<item name="additionalClasses" xsi:type="string">data-grid-actions-cell</item>
<item name="template" xsi:type="string">Magento_Backend/dynamic-rows/cells/action-delete</item>
</item>
</argument>
</actionDelete>
</container>
</container>
</fieldset>
</form>
magento2 xml admin-panel
New contributor
Please try to elaborate clearly what issue you are facing, and also the steps to re-produce that by others if possible. As it stands, it's not possible to figure this out from current description.
– Prateek
15 hours ago
I crated custom dynamic rows in product add/edit page. I can save dynamic rows to values to to custom table with foreign key productid. But i cannot render that dynamically created values to product edit page. When use '<dataSource name="gift_form_data_source">' tag i can load dynamic rows values. But all other produ t deatils will be blank. That is the issue.
– harif
1 min ago
add a comment |
0
0
0
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="provider" xsi:type="string">product_form.gift_form_data_source</item>
<item name="namespace" xsi:type="string">gift_form</item>
</item>
<item name="template"
xsi:type="string">templates/form/collapsible</item>
</argument>
<settings>
<deps>
<dep>product_form.gift_form_data_source</dep>
</deps>
</settings>
<dataSource name="gift_form_data_source">
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="component"
xsi:type="string">Magento_Ui/js/form/provider</item>
</item>
</argument>
<dataProvider
class="
NamespaceProducttypeUiDataProviderProductFormGiftAmountDataProvider"
name="gift_form_data_source">
<settings>
<requestFieldName>id</requestFieldName>
<primaryFieldName>card_amount_productid</primaryFieldName>
</settings>
</dataProvider>
</dataSource>
<fieldset name="dynamic_rows_set">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="label" xsi:type="string" translate="true">Gift
Card Price Settings</item>
<item name="collapsible" xsi:type="boolean">true</item>
<item name="sortOrder" xsi:type="number">4</item>
</item>
</argument>
<container name="dynamic_rows_container">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/dynamic-rows/dynamic-rows</item>
<item name="template" xsi:type="string">ui/dynamic-rows/templates/default</item>
<item name="componentType" xsi:type="string">dynamicRows</item>
<item name="recordTemplate" xsi:type="string">record</item>
<item name="addButtonLabel" xsi:type="string">Add New</item>
<item name="deleteProperty" xsi:type="boolean">false</item>
</item>
</argument>
<container name="record">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="label" xsi:type="string" translate="true">Gift Card Price Settings</item>
<item name="component" xsi:type="string" translate="true">Magento_Ui/js/dynamic-rows/record</item>
<item name="isTemplate" xsi:type="boolean">true</item>
<item name="is_collection" xsi:type="boolean">true</item>
<item name="showFallbackReset" xsi:type="boolean">false</item>
</item>
</argument>
<field name="card_amount_value">
<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">Amount</item>
<item name="formElement" xsi:type="string">input</item>
<item name="showFallbackReset" xsi:type="boolean">false</item>
<item name="validation" xsi:type="array">
<item name="required-entry" xsi:type="boolean">true</item>
</item>
<item name="sortOrder" xsi:type="string">10</item>
</item>
</argument>
</field>
<actionDelete>
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="componentType" xsi:type="string">actionDelete</item>
<item name="dataType" xsi:type="string">text</item>
<item name="fit" xsi:type="boolean">false</item>
<item name="label" xsi:type="string">Actions</item>
<item name="additionalClasses" xsi:type="string">data-grid-actions-cell</item>
<item name="template" xsi:type="string">Magento_Backend/dynamic-rows/cells/action-delete</item>
</item>
</argument>
</actionDelete>
</container>
</container>
</fieldset>
</form>
magento2 xml admin-panel
New contributor
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="provider" xsi:type="string">product_form.gift_form_data_source</item>
<item name="namespace" xsi:type="string">gift_form</item>
</item>
<item name="template"
xsi:type="string">templates/form/collapsible</item>
</argument>
<settings>
<deps>
<dep>product_form.gift_form_data_source</dep>
</deps>
</settings>
<dataSource name="gift_form_data_source">
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="component"
xsi:type="string">Magento_Ui/js/form/provider</item>
</item>
</argument>
<dataProvider
class="
NamespaceProducttypeUiDataProviderProductFormGiftAmountDataProvider"
name="gift_form_data_source">
<settings>
<requestFieldName>id</requestFieldName>
<primaryFieldName>card_amount_productid</primaryFieldName>
</settings>
</dataProvider>
</dataSource>
<fieldset name="dynamic_rows_set">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="label" xsi:type="string" translate="true">Gift
Card Price Settings</item>
<item name="collapsible" xsi:type="boolean">true</item>
<item name="sortOrder" xsi:type="number">4</item>
</item>
</argument>
<container name="dynamic_rows_container">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/dynamic-rows/dynamic-rows</item>
<item name="template" xsi:type="string">ui/dynamic-rows/templates/default</item>
<item name="componentType" xsi:type="string">dynamicRows</item>
<item name="recordTemplate" xsi:type="string">record</item>
<item name="addButtonLabel" xsi:type="string">Add New</item>
<item name="deleteProperty" xsi:type="boolean">false</item>
</item>
</argument>
<container name="record">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="label" xsi:type="string" translate="true">Gift Card Price Settings</item>
<item name="component" xsi:type="string" translate="true">Magento_Ui/js/dynamic-rows/record</item>
<item name="isTemplate" xsi:type="boolean">true</item>
<item name="is_collection" xsi:type="boolean">true</item>
<item name="showFallbackReset" xsi:type="boolean">false</item>
</item>
</argument>
<field name="card_amount_value">
<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">Amount</item>
<item name="formElement" xsi:type="string">input</item>
<item name="showFallbackReset" xsi:type="boolean">false</item>
<item name="validation" xsi:type="array">
<item name="required-entry" xsi:type="boolean">true</item>
</item>
<item name="sortOrder" xsi:type="string">10</item>
</item>
</argument>
</field>
<actionDelete>
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="componentType" xsi:type="string">actionDelete</item>
<item name="dataType" xsi:type="string">text</item>
<item name="fit" xsi:type="boolean">false</item>
<item name="label" xsi:type="string">Actions</item>
<item name="additionalClasses" xsi:type="string">data-grid-actions-cell</item>
<item name="template" xsi:type="string">Magento_Backend/dynamic-rows/cells/action-delete</item>
</item>
</argument>
</actionDelete>
</container>
</container>
</fieldset>
</form>
magento2 xml admin-panel
magento2 xml admin-panel
New contributor
New contributor
edited 48 secs ago
harif
New contributor
asked 15 hours ago
harifharif
12
12
New contributor
New contributor
Please try to elaborate clearly what issue you are facing, and also the steps to re-produce that by others if possible. As it stands, it's not possible to figure this out from current description.
– Prateek
15 hours ago
I crated custom dynamic rows in product add/edit page. I can save dynamic rows to values to to custom table with foreign key productid. But i cannot render that dynamically created values to product edit page. When use '<dataSource name="gift_form_data_source">' tag i can load dynamic rows values. But all other produ t deatils will be blank. That is the issue.
– harif
1 min ago
add a comment |
Please try to elaborate clearly what issue you are facing, and also the steps to re-produce that by others if possible. As it stands, it's not possible to figure this out from current description.
– Prateek
15 hours ago
I crated custom dynamic rows in product add/edit page. I can save dynamic rows to values to to custom table with foreign key productid. But i cannot render that dynamically created values to product edit page. When use '<dataSource name="gift_form_data_source">' tag i can load dynamic rows values. But all other produ t deatils will be blank. That is the issue.
– harif
1 min ago
Please try to elaborate clearly what issue you are facing, and also the steps to re-produce that by others if possible. As it stands, it's not possible to figure this out from current description.
– Prateek
15 hours ago
Please try to elaborate clearly what issue you are facing, and also the steps to re-produce that by others if possible. As it stands, it's not possible to figure this out from current description.
– Prateek
15 hours ago
I crated custom dynamic rows in product add/edit page. I can save dynamic rows to values to to custom table with foreign key productid. But i cannot render that dynamically created values to product edit page. When use '<dataSource name="gift_form_data_source">' tag i can load dynamic rows values. But all other produ t deatils will be blank. That is the issue.
– harif
1 min ago
I crated custom dynamic rows in product add/edit page. I can save dynamic rows to values to to custom table with foreign key productid. But i cannot render that dynamically created values to product edit page. When use '<dataSource name="gift_form_data_source">' tag i can load dynamic rows values. But all other produ t deatils will be blank. That is the issue.
– harif
1 min ago
add a comment |
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
});
}
});
harif is a new contributor. Be nice, and check out our Code of Conduct.
draft saved
draft discarded
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%2f272314%2fproduct-form-with-custom-datasource-not-showing-default-values-except-image-of-p%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
harif is a new contributor. Be nice, and check out our Code of Conduct.
draft saved
draft discarded
harif is a new contributor. Be nice, and check out our Code of Conduct.
harif is a new contributor. Be nice, and check out our Code of Conduct.
harif 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
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%2f272314%2fproduct-form-with-custom-datasource-not-showing-default-values-except-image-of-p%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
Please try to elaborate clearly what issue you are facing, and also the steps to re-produce that by others if possible. As it stands, it's not possible to figure this out from current description.
– Prateek
15 hours ago
I crated custom dynamic rows in product add/edit page. I can save dynamic rows to values to to custom table with foreign key productid. But i cannot render that dynamically created values to product edit page. When use '<dataSource name="gift_form_data_source">' tag i can load dynamic rows values. But all other produ t deatils will be blank. That is the issue.
– harif
1 min ago