Joomla form field 'SQL' doesnt save selected value

37 views
Skip to first unread message

janist...@gmail.com

unread,
Apr 28, 2017, 3:57:40 AM4/28/17
to Joomla! CMS Development
I've a joomla form field 'sql' in custom module [admin-side].

.xml file

<field
name="selected_item"
type="sql"
default="10"
label="Select ur name"
query="SELECT name, id FROM #__test"
key_field="id"
value_field="name"
/>
I want to show in select list name's (I've this working right now), but when I collect module data, I want to get id from selected item name.

I can't even save correctly at the moment. I choose name and press select and it resets to first one in list. Why?

Also, when I try to collect data in my costum_module.php by var_dump($params), I dont get any values (from selected_item field obv). What am I doing wrong?
Reply all
Reply to author
Forward
0 new messages