Closed ksg1960 closed 2 months ago
Can you clarify the problem please? Does it occur when
$select_options
?It is varchar(32) and there are over 50 options in the $select_options variable.
And thank you the systemdefaults.inc.php edit worked. this begs the question, if I want this configuration setting to be stable across upgrades would it be possible to place the line in config.inc.php?
Scott
Scott K. Smith, Director of NMR Spectroscopy The University of Texas at Austin | Chemistry | 832-294-1928 | utexas.eduhttps://www.utexas.edu/
From: campbell-m @.> Sent: Friday, June 28, 2024 9:54 AM To: meeting-room-booking-system/mrbs-code @.> Cc: Smith, Scott K @.>; Author @.> Subject: Re: [meeting-room-booking-system/mrbs-code] User Edit page does not populate fully from Users table (Issue #3688)
Can you clarify the problem please? Does it occur when
— Reply to this email directly, view it on GitHubhttps://github.com/meeting-room-booking-system/mrbs-code/issues/3688#issuecomment-2197121346, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BIZGXGAROJEZGWHY5YRZACDZJV2LXAVCNFSM6AAAAABKCATHDKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJXGEZDCMZUGY. You are receiving this because you authored the thread.Message ID: @.***>
And thank you the systemdefaults.inc.php edit worked. this begs the question, if I want this configuration setting to be stable across upgrades would it be possible to place the line in config.inc.php?
Yes, you should never edit systemdefaults.inc.php and always place your changes in config.inc.php. I was just pointing you to the section of systemdefaults.inc.php which gives you more details.
[like] Smith, Scott K reacted to your message:
It is varchar(32) and there are over 50 options in the $select_options variable.
Thanks. Can you describe how to reproduce the problem please?
If the value in the database table doesn't correspond exactly to one of the options in the config file then the first option will be displayed.
It's usually better to use an associative array for $select_options
, eg
$select_options['users.school'] = array(
'a' => 'Chemistry',
'b' => 'Pharmacy',
'c' => 'Engineering'
);
because then you can change the option description without having to change the database.
Operator Error: first letter capitalization not consistent. the Function works as described.
I have created multiple detail fields for the users in the Users table. The Add User page prepopulates the choices for these attributes by way of config.inc.php:$select_options['users.school'] = array('Chemistry', 'Pharmacy', 'Engineering');
the fields like users.school that are short, seem to populate from the table when opening an Edit User page. One field is extremely long, being about 50 string (varchar) choices also setup in config.inc.php. It populates using the first string in the arrayed list, instead of what is saved in the Users table.
Browser details (please complete the following information):
OS: [Windows 10] Browser [e.g. Edge and Chrome] Version [e.g. 125.0.2535.51] Server details (please complete the following information):
MRBS version [1.11.5 goto time branch] Web server: [e.g. Apache 2.4.48] OS: [e.g. redhat 8] PHP version: { 7.2.24] Database used: [ MySQL 8.0.13]