I have a custom module with a SQL form field
<config>
<fields name="params">
<fieldset name="basic">
<field
name="grid_id"
type="sql"
default="1"
label="Select an imagegrid"
query="SELECT grid_name AS value, grid FROM #__imagegrid" />
</fieldset>
</fields>
</config>
No error
Notice: Undefined property: stdClass::$grid_id in libraries/joomla/form/fields/sql.php on line 308
Joomla 3.7.4
Apache
MySQL
Is this a problem with my module or something in Joomla core? Thanks
Labels |
Added:
?
|
Category | ⇒ | com_fields |
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-07-29 10:30:35 |
Closed_By | ⇒ | zero-24 |
Ah sorry, silly me! Thanks a lot! Fixed!
This sql thing needs to have a key & value. Please take a look here: https://docs.joomla.org/SQL_form_field_type
Also the usage of the parameter
query
should be reduced please use thesql_*
fileds in the from.I'm going to close this as not a core bug thanks. Reopen if needed