DiscussAnything
11-17-2005, 07:35 PM
This is for vb 2.3.x in case it matters.
I have 2 tables, one with the id's and values for the dropdown entries. The other is the table the value is saved to.
The table that populates the dropdown has fields 'id' and 'name' The choosercode is as follows:
makechoosercode("State/Country","state","states", $primoaddy['state']);
state is the field it is being saved to
states is the table it gets the values from
So far so good, this part works. It does save the 'id' to the target table though, and not the name of the state/country. But I'm guessing that's still how it's supposed to be.
Next part is where I'm confused. This is where I compile a list of members' addresses (the ones that put it in anyway). The search option it looks like this:
doformheader("address","findstate");
maketableheader("Find Member - By State");
makechoosercode("State:","state","states",-1,"Any");
It's getting the names just fine and populates the search-dropdown as expected.
BUT, when the results come up, it shows the state id, and not the state name. I'm displaying $fas[state] .
The question is: On the results, is there any way to have the name field show up instead of the id? I can't imagine I did anything wrong particularly since everything else works as expected. So am I doing something wrong, or is there any way I can have it show the results that actually mean something, rather than just a number?
Thanks in advance :)
I have 2 tables, one with the id's and values for the dropdown entries. The other is the table the value is saved to.
The table that populates the dropdown has fields 'id' and 'name' The choosercode is as follows:
makechoosercode("State/Country","state","states", $primoaddy['state']);
state is the field it is being saved to
states is the table it gets the values from
So far so good, this part works. It does save the 'id' to the target table though, and not the name of the state/country. But I'm guessing that's still how it's supposed to be.
Next part is where I'm confused. This is where I compile a list of members' addresses (the ones that put it in anyway). The search option it looks like this:
doformheader("address","findstate");
maketableheader("Find Member - By State");
makechoosercode("State:","state","states",-1,"Any");
It's getting the names just fine and populates the search-dropdown as expected.
BUT, when the results come up, it shows the state id, and not the state name. I'm displaying $fas[state] .
The question is: On the results, is there any way to have the name field show up instead of the id? I can't imagine I did anything wrong particularly since everything else works as expected. So am I doing something wrong, or is there any way I can have it show the results that actually mean something, rather than just a number?
Thanks in advance :)