I am trying to add an input field per store on my CMS page form (the page where we create the CMS page), but the catch is that it needs to be dynamic, I want the input's to appear for each store instead of adding static fields.
Something like what @Dhiren Vasoya does here: https://magecomp.com/blog/magento-2-add-new-field-in-admin-user-create-form/
but to the cms page form.
Thank you for your time in advance!
Here is the solution!
Step 1: Firstly, add the below given code in your form file( in this case cms_page_form.xml in the app\code\Vendor\Extension\view\adminhtml\ui_component folder:
Step 2: After the above step create Fieldset.php file in the app\code\Vendor\Extension\Ui\Component\Form folder and add the below given code:
Step 3: Lastly, after following the above steps clear cache.
cc: https://magecomp.com/blog/dynamically-add-fields-in-custom-admin-form-using-ui-component/