How to have more than 20 options using SQL lookup

Each question on BF Survey Plus can have 20 option fields for the choices. If you need more than that, you can achieve this using BF Survey Plus with the SQL Command field to lookup from a database table, where you can have as many options as you like as you like.

You just need a basic mySQL table to store the options

CREATE TABLE `jos_bfsurvey_plus_example` (
  `id` int(11) unsigned NOT NULL auto_increment,
  `choices` varchar(255) NOT NULL,
  PRIMARY KEY  (`id`)
);

INSERT INTO `jos_bfsurvey_plus_example` (`id`, `choices`) VALUES
(1, 'High'),
(2, 'Acceptable'),
(3, 'Low');

Then in your SQL command field, you need to enter the query to lookup this table

select * from jos_bfsurvey_plus_example

And in your SQL field, enter the field from this query that contains the options

choice

Please note that field validation (for radio & checkbox question types) will timeout and not work correctly if there are too many options, but it should still work ok as long as you don't go overboard with too many options.

Go to top