I'm creating a new widget which can be added to a cms page in admin, i have all the fields defined and it adds the widget to the page, but i need to load in some custom jquery so i can attach some events to the form fields.
So here is the xml definition with the parameters that i need to also inject the jquery:
<widget class="Vendor\Module\Block\Widget\Posts" id="vendor_module_posts">
<label>RssFeeds Articles by Posts</label>
<description>Widget to show the latest articles from the processed RSS Feeds</description>
<parameters>
<parameter name="title" sort_order="5" visible="true" xsi:type="text">
<label>Title</label>
</parameter>
<parameter name="rss_posts" xsi:type="multiselect" visible="true" sort_order="10" source_model="Vendor\Module\Ui\Component\Listing\Column\RssPosts">
<label translate="true">Posts</label>
</parameter>
<parameter name="show_image" xsi:type="select" required="true" source_model="Vendor\Module\Model\Config\Source\Select" visible="true" sort_order="20" >
<label translate="true">Show image</label>
<description>Select type option</description>
</parameter>
<parameter name="show_author" xsi:type="select" required="true" source_model="Vendor\Module\Model\Config\Source\Select" visible="true" sort_order="30" >
<label translate="true">Show author</label>
<description>Select type option</description>
</parameter>
<parameter name="show_published_date" xsi:type="select" required="true" source_model="Vendor\Module\Model\Config\Source\Select" visible="true" sort_order="40" >
<label translate="true">Show published date</label>
<description>Select type option</description>
</parameter>
<parameter name="show_title" xsi:type="select" required="true" source_model="Vendor\Module\Model\Config\Source\Select" visible="true" sort_order="50" >
<label translate="true">Show title</label>
<description>Select type option</description>
</parameter>
</parameters>
</widget>
I'm basically wanting to add some jquery to attach to some of the elements for change events etc.
NOTE: This is only for the admin area where you actually select the widget to add to the page and select the options, i don't need the jquery on the frontend (that bit i already know how to do)