Custom Code OnLoad Fails to Bind Options to Radio Group

Hello,

I am facing a critical issue with ChronoForms v8. I am setting up dynamic capacity management for a medical course, but I am not a programmer; I am setting up the form logic with the support of an AI assistant.

We have successfully built the entire logic (cURL, data processing, date filtering) within the PHP block, but the final step fails: The options list is not binding (rendering) to the Radios Group element in the front-end.

Technical Details & Error

  • Goal: Read data from a Google Sheet (via cURL) and populate the CycleStartDate Radios Group with the two nearest future dates.

  • Element: CycleStartDate (Radios Group).

  • PHP Status: The PHP code executes perfectly and produces the correct string format (e.g., "Feb 2026=Feb 2026 (Status: Presentation...)\nMay 2026=...").

  • The Issue: The Radios Group component ignores the PHP output, leaving the field blank. The debug confirms that the code writes the string correctly to the global array, but the component does not read it.

The Crucial Question

We need to know the definitive, internal syntax required by ChronoForms v8 to dynamically inject the options list into a Radios Group from an OnLoad Custom Code action.

  • Which specific array path (e.g., $this->data['fieldname']['options'] or $this->set('variable', 'value', 'view')) is guaranteed to work for the v8 Radios Group binding?

Any help with the final piece of this solution would be greatly appreciated. Thank you!

Max_admin 1d ago
Answer

Hi Giorgio

If you have the options prepared before the form loads then use this one:

https://www.chronoengine.com/faqs/chronoforms/chronoforms8/dynamic-options-for-dropdowns-and-multi-selection-fields

But if the options change based on the selection of another field after the form page has been loaded (interactive options), then this one:

https://www.chronoengine.com/faqs/chronoforms/chronoforms8/how-to-build-a-dynamic-dropdown-in-chronoforms-8

Although the tutorials are for Dropdowns, they should work for Radios and Checkboxes groups, all of them use the options and dynamic options.

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
You need to login to be able to post a reply.