I created my own component for FAQ several years ago for Joomla 3 and now I'll migrating it to the Joomla 4. I have template edit.php where admin can add new questions.
In this template I displaying multiple list where admin can select one or several articles for each question. The type of this field is SQL, but in admin panel it looks like a list.
Below you can see screenshot: I want to style this field and do it something like field Tags in article edit template: This code of this field from XML:
Code: Select all
<field name="id_article"
type="sql"
label="COM_FAQ_ID_ARTICLE"
description="COM_FAQ_ID_ARTICLE_DESCRIPTION"
query="SELECT id, concat(title, ' : ( id-',id,' )') AS title FROM #__content"
key_field="id"
value_field="title"
required=""
class="faq-width select-multiple choices__input"
default=""
multiple="multiple"
/>
Thanks!