This is a duplicate of the topic (
www.joomlapolis.com/forum/13-general-plugins/236492-cb-code-field-not-saving
). I was asked by Kyle to open a ticket in this forum, instead of the general one.
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;
Based on Kyle's suggestion, I replaced the above code with the following simple statement. This did not work either. Whatever I enter, it saves (1).
return array( 1, 2, 3, 4 );
Information on accessing a dev environment where you can see this error was sent to Kyle earlier. Following is the messages URL/ID.
www.joomlapolis.com/my-messages?task=show&messageid=804453
The problem field is (
cb_arrival_to_australia), which is displayed on the page (
newaussie.com.au/dev/index.php/cb-profile-edit
) as (
Arrival to Australia).
If you fix the error in the above environment, please let me know what you changed. This environment is made only for you to see the problem. I need to implement the fix in my dev/test & prod.