Re: [MRBS-general] Dynamic Drop Down - - Edit Entry Form
Brought to you by:
jberanek
From: <dn...@f2...> - 2012-02-29 19:08:10
|
This is similar to a requirement I have. For an additional field when booking a room, I want a select_options[entry.field] entry which comes from a mysql query. In principle, this can be done within the config.inc.php, calling a suitable function to return the array. However, before trying to do that myself, I thought it would be worth asking if there was already suitable code around, or better ways to do this. If config.inc.php is called multiple times, then code in it is an overhead - is it called multiple times? What higher level functions are defined already for accessing the database when config.inc.php is run - am I starting from scratch, or can I use standard functions within MRBS? This particular requirement is selecting a caretaker from a list, and it is required that the list of caretakers can be modified by others. Regards David Lee Flore UK From: Jill Jensen [mailto:jil...@gm...] Sent: 28 February 2012 19:25 To: mrb...@li... Subject: [MRBS-general] Dynamic Drop Down - Separate Table in Same Database - Edit Entry Form Hi! I've been searching for days without being able to find the answer to my question. If anyone could help me it would be greatly appreciated! I'd like to add a custom field to the Edit Entry form. I understand that I need to add the field to the two tables and have done so and it populates but I'd really like to include a dunamic drop down with information pulled by a mysql query from a table in the same database. I've successfully set arrays for my new fields but cannot figure out the proper code to pull the array information from a query. Is this possible? Thank you so much in advance for any help! Jill |