Obtain values from one list as read-only

madpato

Member
Hello

I need to achieve the following (my client changed things a bit so i had to make some changes :( )

On my generaciones lists i need now to set 12 months that can begin in any month so i will (just thinking on what approach to take, this is what i believe will work) create 12 fields of dropdowns called month 1, month 2, etc. until 12.
After doing that i need to just show as readonly those values on my tns_datos_mensuales form (tab Datos Mensuales here )
I need to show exactly 12 entries only (i was making a repeating group as you can notice, well this no longer applies here will change it later just need to figure this now...).
I want to show those 12 entries but they will need to match the month 1, month 2, etc. I was thinking on just creating 12 fields (1 for each month) and with something like a display field show the month that corresponds to each month, i was trying this code:

PHP:
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$generacion = (int) '{tns_emprendedores___emp_generacion}';
$query->select('mes1')->from('tns_generaciones')->where('id = ' . $generacion);
$db->setQuery($query);
return $db->loadResult();

But i get an empty field, can you please help me? thank you.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top