0

Field that retrieves the data, but there is no label and the issue with width

<field name="custom_category_footer_description">
 <argument name="data" xsi:type="array">
 <item name="config" xsi:type="array">
 <item name="class" xsi:type="string">Magento\Catalog\Ui\Component\Category\Form\Element\Wysiwyg
 </item>
 <item name="formElement" xsi:type="string">wysiwyg</item>
 <item name="label" xsi:type="string" translate="true">Custom Category Footer Description</item>
 <item name="wysiwyg" xsi:type="boolean">true</item>
 <item name="dataScope" xsi:type="string">custom_category_footer_description</item>
 <item name="sortOrder" xsi:type="number">36</item>
 </item>
 </argument>
 <formElements>
 <wysiwyg class="Magento\Catalog\Ui\Component\Category\Form\Element\Wysiwyg">
 <settings>
 <rows>4</rows>
 <wysiwyg>false</wysiwyg>
 </settings>
 </wysiwyg>
 </formElements>
</field>

Field that has correct template usage, but doesn't retrieve the data.

<field name="custom_category_footer_description" template="ui/form/field" sortOrder="36" formElement="wysiwyg">
 <argument name="data" xsi:type="array">
 <item name="config" xsi:type="array">
 <item name="class" xsi:type="string">Magento\Catalog\Ui\Component\Category\Form\Element\Wysiwyg</item>
 <item name="formElement" xsi:type="string">wysiwyg</item>
 <item name="label" xsi:type="string" translate="true">Custom Category Footer Description</item>
 <item name="dataScope" xsi:type="string">custom_category_footer_description</item>
 <item name="sortOrder" xsi:type="number">36</item>
 </item>
 </argument>
 <formElements>
 <wysiwyg class="Magento\Catalog\Ui\Component\Category\Form\Element\Wysiwyg">
 <settings>
 <rows>4</rows>
 <wysiwyg>false</wysiwyg>
 </settings>
 </wysiwyg>
 </formElements>
</field>

What needs to be changed?

1 Answer 1

0
<field name="custom_category_footer_description" sortOrder="36" template="ui/form/field" formElement="wysiwyg">
 <argument name="data" xsi:type="array">
 <item name="config" xsi:type="array"> 
 <item name="source" xsi:type="string">custom_category_footer_description</item>
 <item name="is_pagebuilder_enabled" xsi:type="boolean">false</item> <-- just in case you have one but don't need it there
 </item>
 </argument>
 <settings> 
 <label translate="true">Custom Category Footer Description</label>
 <dataScope>custom_category_footer_description</dataScope>
 </settings>
 <formElements>
 <wysiwyg class="Magento\Catalog\Ui\Component\Category\Form\Element\Wysiwyg">
 <settings>
 <rows>4</rows>
 <wysiwyg>true</wysiwyg>
 </settings>
 </wysiwyg>
 </formElements>
</field>
answered Feb 6 at 11:12
1
  • in my xml layout i have two custom attributes and only the one shows/saves the data depending on their sort order (if the layout is correct and done similarly to core's category_form). once i do the incorrect version (that doesn't have the label), it fetches and saves data for both... Commented Feb 7 at 10:44

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.