The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Where would I put this code to make drop down menu's be selected a certain option...
Okay...didn't know what else to name this thread...so let me explain. I have some drop down menu's in Edit Profile in the User CP that have drop down menu's. The user selects what they want from the drop down menu and then submit's it to the database. Now...when the user returns to Edit Profile I'd like those drop down menu's to be selected with what they chose. Either way...I have the code I need to do it...just don't know what file and where to put it. The Birth Date drop down menus in Edit Profile are prime examples of what I'm trying to do.
|
#2
|
||||
|
||||
I think I get your question ...
Code:
<select ... <option selected="selected" value="currentvalue">Current Name</option> So you need to PHP Code:
Code:
<option $current value="currentvalue">Current Name</option> Make any sense ? |
#3
|
||||
|
||||
Right...I know "how" to do it...thats not the question...the question is where to put my piece of code....in other words...where would i put the "$current....."
|
#4
|
||||
|
||||
in includes/functions_user.php I would have thought ...
|
#5
|
||||
|
||||
Well...after looking through the hundreds of lines of functions_user.php...I agree that that is where it would go....but I still can't figure out where....
|
#6
|
||||
|
||||
Do you have a separate function you have written to handle your dropdown menu ?
|
#7
|
||||
|
||||
I do not.
|
#8
|
||||
|
||||
Ahhhh - ok so you wanna use the Extra Options facility and add your own test for $current pet ... sorry I had my general query brain in, not my specific query brain LOL
2 secs ... BRB ... ......... Looking at the function verify_profilefields($formtype = 0), it look slike it should work for custom profile fields just as well as the default ones ... how have u configured your custom field ? |
#9
|
||||
|
||||
Well I haven't used any of the actual custome fields. I just have my new form elements w/ drop down menus and they are named "pettype" and "petgender"...
|
#10
|
||||
|
||||
rite - well as NTLDR has said - https://vborg.vbsupport.ru/showpost....4&postcount=16 - you need to globalise your _POST variables for them to get down into the functions, but why not use a custom field - that way you just need tu extrapolate data from the user table ?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|