vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=318765

need help with print_select_row
by sodagod
22 May 2015 19:20

I am trying to get the selected option, but it always returns a number.

here is how i did it.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

this always results in the number of selected option, I also tried type_array as type_str and that didnt work.

kh99 22 May 2015 19:47

You can either use the number returned as a key to the array, so that the last line in your example might be:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Or else you can make the array keys the values you want to get back, like:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

I'd probably go with the first one if you can because if you use the same text you display you might run it to problems if it contains punctuation or something. If the choices are simple strings then it probably doesn't matter. Actually it might not matter either way, I guess it's just that I would do it the first way because I'm not sure.

sodagod 22 May 2015 20:32

first option works better, i tried that before, but I wasn't using the array value.


All times are GMT. The time now is 23:08.

Powered by vBulletin® Version 3.8.14
Copyright © 2021, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.