Dynamic select list on user account / add user page
PermalinkI know how to get the dynamic list form a database table and create a dynamic list for the select options.
echo $form->select('clientsID', $indexed_array, '0');
Question: Where and how to add this to the account/add user page and save this to the user table? (and the attribute tables)
But saving is a problem (and using the concrete's own functions).
The problem with this user attribute is:
- You can't edit the values that way, only the display names.
- If something changes in the external db you also have to edit the display name in concrete.
- Have to exactly match names (strings with special chars), its better to match id's.
If i could fill in key -> value it wouldn't be such a problem.
Then maybe you should create a new attribute type which would get the data from the db as you want it.
You could probably do it quickly enough by modifying the core select attribute type
Better to modify the get_ and update_ functions from the controller.
But still not found the right combination of code to do it.
But take this approach cautiously, I have personally never tried something like that, just a thought at how you could do it, but certainly not the most thorough way.