Gossamer Forum
Home : Products : DBMan : Discussions :

Re: Last try: Select field also pulls related data

Quote Reply
Re: Last try: Select field also pulls related data In reply to
Karen, thank you for your concern

Answer to your first question: YES!

Answer to your second : NO! A separate database is out of question, because that would require that I'd enter 6000 schools and their addresses all by myself.

And of course: You said: "without the value being entered for the particular record, the record is incomplete."

Note: I became aware of this problem when a friend of mine spelt every entry with small letters while I spelt every entry with a capital first letter. We didn't turn up together in searchresults although we live in the same city.


Here some in-depth explanation for you Karen (and for everyone interested):

What I have now (example):
---------------------------------

When signing up, the add form shows up requiring that you enter

- School
- City
- Country

At the top of the form I have three select fields. They contain School, City and Country -information that have already been entered by a one or a few other users that signed up before.

In order to make people spell their school the same way as others did before (if already existing in the database because somebody else enterd it already), I want them to give the possibility to choose an existing spelling of the school, else the new user might spell "Saint Peter school" and an older entry was spelled "St Peter School" which would be the SAME school spelled in two different ways.

So now they can choose an already existing School, City and Country in three different select-boxes.

print &build_select_field_from_db("School",$rec{'School'});
print &build_select_field_from_db("City",$rec{'City'});
print &build_select_field_from_db("Country",$rec{'Country'});

But, they have to make a selection in each and every one of them. When they have made their (existing!) selections, they click on a button that I call "Copy!". Then the entire Add-form reloads (I call the add_form once more, see code below) with the selected data in the required fields. So, the formerly empty fields now contain School=St Peter School, City=St Petersburg, Country=Russia.

<input type="hidden" name="db" value="$db_setup">
<input type="hidden" name="uid" value="$db_uid">
<input type="hidden" name="add_form" value="1">
<INPUT TYPE="SUBMIT" NAME="" VALUE="Copy!">



Now, what i would like to have:
---------------------------------

When users sign up, facing the Add-form, I would like to give them the possibility to choose from only ONE select box at the top of the form instead of three, because if they choose St Peter School, it is obvious that the city of that school is St. Petersburg and the country is Russia.

print &build_select_field_from_db("School",$rec{'School'}); # OR SOME ROUTINE LIKE THAT ONE

So, when the script pulls the data from an existing record who's owner goes to the St Peter School, it might as well pull the name of the city and the country and then (after "Copy!") fill it in the three fields called School, City and Country.



Is this understandable?


/CSky


Subject Author Views Date
Thread Last try: Select field also pulls related data csky 3413 Feb 9, 2001, 2:23 PM
Thread Re: Last try: Select field also pulls related data
Karen 3329 Feb 9, 2001, 6:09 PM
Thread Re: Last try: Select field also pulls related data
csky 3346 Feb 9, 2001, 10:19 PM
Thread Re: Last try: Select field also pulls related data
Karen 3340 Feb 10, 2001, 1:16 AM
Thread Re: Last try: Select field also pulls related data
csky 3317 Feb 10, 2001, 10:28 AM
Thread Re: Last try: Select field also pulls related data
LoisC 3301 Feb 10, 2001, 11:04 AM
Post Re: Last try: Select field also pulls related data
csky 3309 Feb 10, 2001, 1:23 PM