Joomla.it Forum
Non solo Joomla... => Sviluppo => : baldo 03 May 2013, 15:54:01
-
ciao
sto scrivendo un componente per joomla 2.5
per ora ho due tabelle
nella tabella preventivi c'č un campo consumo_id fk(tab_consumo.id)
lato backend
come faccio a visualizzare un campo select nel form del preventivo?
tab_preventivi
id
nome
consumo_id
tab_consumo
id
title
-
quote
-
ho risolto cosė
<field
name="consumo_id"
type="sql"
default="0"
label="COM_PREVENTIVI_FORM_LBL_PREVENTIVO_CONS UMO"
query="SELECT id as value, title FROM #__preventivi_consumo"
value_field="title">
non c'č una sintassi piu coincisa senza dovere scrivere la query sql?
-
http://docs.joomla.org/Creating_a_custom_form_field_type