• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

How to add radio buttons in Options page

AndyB

Well-known member
#1
In my Bookmark add-on I currently have the following four selections in the Options page:

pic001.jpg

This works, but it's confusing to admins because all four selection can be selected. What I would like to do is make the first two selection be radio Buttons and make the last selection Radio Button.

So how do I set up the edit page?

Edit Format: Radio Buttons
Data Type: Array
Array Sub-Options:

What should I enter into the Array Sub-Options field?

Thank you.
 

Chris D

XenForo developer
Staff member
#2
As a collection of radio buttons can only have a single value, a data type of "Array" won't work. Only one radio button can be selected at a time, hence only one value can be stored.
 

Chris D

XenForo developer
Staff member
#4
That would require two options.

One that gives two radio buttons for Post Date and Bookmark Date and another that gives two radio buttons for Sort Descending and Sort Ascending.
 

AndyB

Well-known member
#5
That would require two options.

One that gives two radio buttons for Post Date and Bookmark Date and another that gives two radio buttons for Sort Descending and Sort Ascending.
Yes exactly what I would like to do. The problem is I have no idea how to set these fields:

pic001.jpg
 

Chris D

XenForo developer
Staff member
#6
As stated, it can't be an array because radio buttons would output a single value.

With that in mind, you should be able to choose an appropriate data type; and if it can't be an array, then maybe Array Sub-Options doesn't need to be set...