Closed gfernandes410 closed 4 years ago
@jalogut have you seen this PR?
Hi @gfernandes410 I merged your PR and created a new version 1.11.1. Thanks for your contribution and sorry for the delay.
Hi . It does not seem to work if I have a UI component tab on the form. It does not save and Im getting this error:
Error: Call to undefined method Vendor\Module\Controller\Adminhtml\Module\Save\Interceptor::generateRandomString()
Please help. Thank you
<fieldset name="main_fieldset">
<settings>
<label translate="true">Tab 1</label>
</settings>
<field name="store_id">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="visible" xsi:type="boolean">true</item>
<item name="dataType" xsi:type="string">number</item>
<item name="formElement" xsi:type="string">hidden</item>
<!--<item name="default" xsi:type="number">0</item>-->
<item name="sortOrder" xsi:type="string">10</item>
<item name="source" xsi:type="string">main_fieldset</item>
</item>
</argument>
</field>
<field name="entity_id">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="visible" xsi:type="boolean">false</item>
<item name="dataType" xsi:type="string">text</item>
<item name="formElement" xsi:type="string">input</item>
<item name="source" xsi:type="string">main_fieldset</item>
</item>
</argument>
</field>
<field name="identifier">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="visible" xsi:type="boolean">true</item>
<item name="dataType" xsi:type="string">text</item>
<item name="label" xsi:type="string">Identifier</item>
<item name="formElement" xsi:type="string">input</item>
<item name="source" xsi:type="string">main_fieldset</item>
<item name="validation" xsi:type="array">
<item name="required-entry" xsi:type="boolean">true</item>
</item>
<item name="sortOrder" xsi:type="number">10</item>
<item name="scopeLabel" xsi:type="string">[GLOBAL]</item>
</item>
</argument>
</field>
<!-- Add your fields here -->
</fieldset>
@jalogut @gfernandes410 . Please help thanks
Hi Guys,
First of all, nice project and thank you for all suport!
If you not set identifier on create a register, you will get an error on edit this register. My suggestion is on VENDOR\MODULE\Controller\Adminhtml\ENTITY**Save.php** before you save, make an validation and if the identifier is null make same random.
Some thing like that: