Gossamer Forum
Home : Products : DBMan : Customization :

Help needed with two linked DB's

Quote Reply
Help needed with two linked DB's
Hi

I have DBMan set up for a educational organisation with one database for Course Providers and one for Courses. (A beta version is up here: http://www.citinet.org.uk/...rses&uid=default

The Courses database takes the Centre Name and Course Provider information from the Course Provider database and builds a select field for these two entries (using build fancy select field).

It all basically works (thanks to a post from JPD ages ago Smile), however when one goes to modify a Course the two fields from the Provider database have to be selected again - has anyone any good ideas about how I can make it so the selected items for these fields are carried over?


Chris
Quote Reply
Re: Help needed with two linked DB's In reply to
I'm having trouble picturing your problem. Could you set up a username and password for me with admin permissions and then send them to me at deni@jpdeni.com? I'll take a look and then I can better see what you mean.


------------------
JPD





Quote Reply
Re: Help needed with two linked DB's In reply to
Suppose your select field looks like this...

print qq|
<select name="test">
<option value="1">one
<option value="2">two
<option value="3">three
</select>
|;

Put if statements in...

print qq|
<select name="test">
<option value="1"|;
if ($in{'test'} eq '1') {
print qq| selected|;
}
print qq|>one
<option value="2"|;
if ($in{'test'} eq '2') {
print qq| selected|;
}
print qq|>two
<option value="3"|;
if ($in{'test'} eq '3') {
print qq| selected|;
}
print qq|>three
</select>
|;