ComboBox Items via PHP Connector

I’m wondering, if it would be possible to populate a combobox on the server-side.

What I’m trying is to populate a combo-box on a form.

My server-side code code looks like this:

function viewForm($connection, $where, $customerid) {
$invoices = new ComboConnector($connection, "MySQL");
$invoices->render_sql("select inv_title from invoices where customerid = ".$customerid, "id", "inv_title");

$formConn = new FormConnector($connection, "MySQL"); 
$sql = "SELECT id, orderdate, customer, orderno, invoice from orders "; // invoice is the FK to the table invoicess - I want to be able to select that via a combo-box
$formConn->set_options("invoice", $invoicess);

$formConn->render_sql($sql . $where, "id", "id,oderdate,customer,orderno");
}

On the client side, I’m initializing a form that needs to be populated. Somehow it doesn’t render my form-data, instead the combo-options are rendered, even though I use the set_options-command.
I’ve tried an options-connector, which also doesn’t work somehow (only my foreign key an NO options are displayed).
Is there any way to populate select-items or combobox-items on load-time on the server side? I can’t use an connector:“url” in my init, because i don’t want the overhead of 10.000+ invoices in this single combo. The combo-content is dependant on the customer’s id… it would be nice if there was any way to populate a combo the way it works on grids and stuff, too.
Could anyone provide a working example?

Unfortunately it can’t be used in such way.
To start - you need to use OptionsConnector not ComboConnector, if you wish to include output of options in form data. But it will not help anyway, as form will not reset list of options in combo after form data loading

Options in combo - is part of configuration and common for any data in form ( this is by design )

Too bad :frowning:

I’m updating my combos, wich are dependent on other values, in the form’s “onXLE” and combo’s “onSelectionChange”-events now. This does the trick. Not very comfortable, but working :slight_smile: