Forums

single checkbox dynamic setting

kraadde 6d ago

How to setup a single checkbox where the value and the text are dynamically taken from a db field?

I tried using a php99: 

$options = [    ['value' => $this->data("datum_1"), 'text' => $this->data("datum_1")],

];return $options;

and the value set to {var:php99} but the checkbox has no valeu and no text attached although the debugger shows:

 [php99] => Array
        (
            [0] => Array
                (
                    [value] => 2025-07-23
                    [text] => 2025-07-23
                )

        )

.

Max_admin 5d ago
Answer

The easiest way is to call the Read Data variable in the Checkbox label and value fields:

Label: {var:read_data_name.field_name}

Value: {var:read_data_name.field2_name}

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.

VPS & Email Hosting 20% discount
hostinger