PDA

View Full Version : adminCP Checkboxes


Dr.CustUmz
02-12-2015, 07:57 AM
so i finally got checkboxes working in my product now i have 2 questions about using them.

1. as of right now my checkboxes show in a list like:

1
2
3
4
5

i want them to show up next to each other like

1 2 3 4 5

so just wondering how i can do that.


2. now that i have the checkboxes, how exactly do i use the $vboptions[drc_sg] with them in an if statement. exp:
<if condition="$vboptions[drc_sg] == CHECKED">show this</if>

this is what the setting looks like

<setting varname="drc_sg" displayorder="20">
<datatype>free</datatype>
<optioncode>checkbox
0|one
1|two
2|three
3|four
4|five
5|six</optioncode>
<defaultvalue>a:6:{i:0;i:1;i:1;i:1;i:2;i:1;i:3;i:1;i:4;i:1;i:5;}</defaultvalue>
</setting>

im going to take a wild guess here and try it right after i post this but i think i just got the solution to the second one.

<if condition="$vboptions[drc_sg] == a:6:{i:3;i:1}">show this</if>
that would give me if option 3 is checked right? idk ill go find out lol. thanks for any help though guys =)

and yeah... that if condition failed but hey worth a shot lol

--------------- Added 1423743629 at 1423743629 ---------------

no longer using this method, although a response for future use could still prove helpful =)