Gossamer Forum
Home : Products : DBMan : Customization :

A mod of mod 000434.html??

Quote Reply
A mod of mod 000434.html??
One of the coolest mods I've run across on this board is JPDeni's "Fancy Select Field" mod -- not because it is so complex, but because it really offers a lot of flexibility in setting up unique forms. Having said that, here's my question:

Could that mod be modified to "load" certain drop downs based on how the .cfg file was setup? To explain a little further, I was hoping to have an assortment of databases that all had different types of drop downs on their respective "Add" form. But I don't want to have to code the drop downs everytime a new or different db is added becuase it might be any combination of say 10 drop downs based on the end user. What I have been (unsuccessfully) exploring is how to set up these 10 or so pre-defined drop downs as is discussed in JPDeni's mod, calling them something like drop1, drop2, drop3, etc. Then based on the related .cfg file for that db only the drop downs specified would show up on that form?? Does this make sence? So based on how you configured the .cfg file you would see that particular combination of drop downs.

In my case, this would greatly reduce setup time by just quickly setting up the .cfg file, instead of having to hand edit the drop down combinations everytine. But the even bigger picture is that it could kind of be used as another way to authorize or restrict access to certain types of info.

Is this too hard?

Thanks for any input!

Sandy
Quote Reply
Re: A mod of mod 000434.html?? In reply to
I'd really need to see an example of what you're trying to do. Sometimes it's hard for me to visualize the problem.


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





Quote Reply
Re: A mod of mod 000434.html?? In reply to
OK...let me construct a couple mini-versions of what I mean.

Thanks!

Sandy
Quote Reply
Re: A mod of mod 000434.html?? In reply to
JPDeni...

Sorry for taking a whole day to get back to this. My oldest son required motherly "attention" that was, shall we say, unavoidable! It's the joys of motherhood! : )

OK, now mind you, the project is in a conceptual phase as I figure out what I can and can't do. This configurable down down thing will determine alot how I set up additional features.

Quickly, the idea is that members can "subscribe" for certain levelsd of info that is derived from a list "categories". When subscribing, they would chose which categories they want to subscribe too, which would then result in those categories showing up as drop downs in dbman. They could pick from somewhere around 10 -100 "categories" or more.

The "categories" are what I want to display in drop downs. But like I said before, I only want to display the ones the member selects when siging up.

If you look at my mock up at http://www.verycrazy.com/users/sandy/cgi-bin/dbman/db.cgi you'll see 10 drop downs (nothing is configured with real data at this stage in the test - it's purely a mock up) If you look at http://www.verycrazy.com/users/sandy/cgi-bin/dbman/db.cgi?db=db1 you'll see that there are 8 categories and if you look at db=db2 it has 5. All that can be done by hand by simply setting up the .cfg/html.pl files to include whichever dropdowns you want, but what I'm trying to figure out is if there's a way to use the "if" and "else" stuff to have only those dropdowns load that the member subscribes too.

I was envisioning some way to put:

$drop1
$drop2
$drop3
etc, etc

in the members .cgf file and based on which ones were included, the if statements would cause those drop downs to load.

That is what I'm trying to figure out. Do you think I am coming at it from the wrong direction? Maybe there is an altogether different way that would work, or maybe it isn't even possible. I hope it is...

Thanks again for any help or insight you might be able to offer!

Sandy
Quote Reply
Re: A mod of mod 000434.html?? In reply to
You would determine which lists were on the search form by looking at a field in the user's record? It could be done, but it would require doing a "get_record" at the beginning of sub html_view_search.

You say that
Quote:
They could pick from somewhere around 10 -100 "categories" or more.

Would these all be in one field in the user's record? Or would you have a field for each "category"?

As for the select fields themselves -- what are they being used for? To search on a specific field? (I think that's how it would have to be.)

Or are you wanting to make a select field on the fly with the values that are in a field in the user's record to search in one field?

Is there any way I could get a concrete example of what you're doing? It needn't be the real type of data you're interested in searching for, but just something to wrap my aging mind around. Smile

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





Quote Reply
Re: A mod of mod 000434.html?? In reply to
YOU'RE aging mind!?! Mine is quickly turning to mush the longer the kids are out of school!

I will put some stuff together to show you better what I'm tryin to say....

Thanks a ton for even helping me along with this!

Sandy