×
Please submit new Bug Reports on GitHub: github.com/Jensen-Technologies/component-creator-issues/issues
SQL Field Type to select article.
Betton Design
Yeni Üye
Posts: 2
8 yıl 5 ay önce #1359
Yazan: Betton Design
SQL Field Type to select article., Betton Design tarafından oluşturuldu
Hi all
I have used Component Creator to create a very simple image organiser. One the the form fields is a standard SQL field with a query to select articles. the resulting xml code is:This works with no issue.
I have also selected that this should be searchable, it is here that I have the problem. Currently the article title is shown in the list view but when I search via article title then there are no results. Instead if I search via article id then the correct item appears.
Does anyone know what I need to do in order to make the article title searchable rather than the article id?
I have used Component Creator to create a very simple image organiser. One the the form fields is a standard SQL field with a query to select articles. the resulting xml code is:
<field
name="article"
type="sql"
query="SELECT id, title FROM #__content"
key_field="id"
value_field="title"
label="COM_BD_MEDIAMANAGER_FORM_LBL_ITEM_ARTICLE"
description="COM_BD_MEDIAMANAGER_FORM_DESC_ITEM_ARTICLE"
hint="COM_BD_MEDIAMANAGER_FORM_LBL_ITEM_ARTICLE"/>
I have also selected that this should be searchable, it is here that I have the problem. Currently the article title is shown in the list view but when I search via article title then there are no results. Instead if I search via article id then the correct item appears.
Does anyone know what I need to do in order to make the article title searchable rather than the article id?
Lütfen sohbete katılmak için Giriş ya da Hesap açın.
Betton Design
Yeni Üye
Posts: 2
8 yıl 5 ay önce #1360
Yazan: Betton Design
Betton Design tarafından SQL Field Type to select article. konusunda yanıtlandı
OK, I have modified my XML file as below:This seems to work but I'm not sure if it's correct.
<field
name="article"
type="sql"
query="SELECT title FROM #__content"
key_field="title"
value_field="title"
label="COM_BD_MEDIAMANAGER_FORM_LBL_ITEM_ARTICLE"
description="COM_BD_MEDIAMANAGER_FORM_DESC_ITEM_ARTICLE"
hint="COM_BD_MEDIAMANAGER_FORM_LBL_ITEM_ARTICLE"/>
Lütfen sohbete katılmak için Giriş ya da Hesap açın.
Sayfa oluşturma süresi: 0.050 saniye