<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Posts on Petar Borisovski</title>
    <link>/posts/</link>
    <description>Recent content in Posts on Petar Borisovski</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Sun, 10 Oct 2021 00:00:00 +0000</lastBuildDate><atom:link href="/posts/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>How to add options from a source model to an input field in a Form UI component</title>
      <link>/posts/dynamicinputfielduicomponent/</link>
      <pubDate>Sun, 10 Oct 2021 00:00:00 +0000</pubDate>
      
      <guid>/posts/dynamicinputfielduicomponent/</guid>
      <description>In the Magento backend, when we usually want to have a dropdown field with pre-defined data that we can select from, we use a SourceModel.
If we want to use a SourceModel in a UI component, lets say in a Form component, we would set the formElement of the field that we want to use to be formElement=&amp;quot;select&amp;quot;. Inside the field element we would specify our source model under
&amp;lt;field name=&amp;#34;test&amp;#34; formElement=&amp;#34;select&amp;#34;&amp;gt; &amp;lt;formElements&amp;gt; &amp;lt;select&amp;gt; &amp;lt;settings&amp;gt; &amp;lt;options class=&amp;#34;{{PATH_TO_SOURCEMODEL}}&amp;#34;/&amp;gt; &amp;lt;/settings&amp;gt; &amp;lt;/select&amp;gt; &amp;lt;/formElements&amp;gt; &amp;lt;/field&amp;gt; This is all fine when you want to have a select element in your configuration.</description>
    </item>
    
  </channel>
</rss>
