Skip to Content Skip to Menu

🌟Discover the Joomla AI Plugin that wrote its own story! - CB Editor Assistant 1.1now for Joomla 3, 4 & 5!
✍️ 5-Day Free Trial, then 🎯 save up to 30% with our 🛍️ Intro Offer (First 50 users, ends Dec. 25th)
🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

CB Code Field not Saving

7 years 8 months ago #293411 by bilal.abdeen
CB Code Field not Saving was created by bilal.abdeen
Thank you very much for your effort and time to help...

I have created a "Code Drop Down (Single Select)" field. It is supposed to display a select input element showing the last 120 years. The user should select a single year. It displays the data correctly. However, it does NOT save the selected value. What am I missing?

Following is the code, which I entered in (Parameters -> Code):

$current_year = date('Y');
for ($i=0; $i<121; $i++)
{
$year = $current_year-$i;
$year_array[$year] = "$year";
}
return $year_array;

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum