Multiple Choice List Box

Got something cool to share with AppGini users? Feel free to post it here!
Post Reply
gatenet
Posts: 14
Joined: 2016-07-26 09:34
Location: Greece
Contact:

Multiple Choice List Box

Post by gatenet » 2017-09-05 15:59

Hi there forum i need help. When we put data in appgini programm in multiple choice list box when we generate that in which file does this data goes, lets say that we forgot to put 1 item there where i will find that data to update it?
Thank you

peebee
AppGini Super Hero
AppGini Super Hero
Posts: 181
Joined: 2013-03-21 04:37

Re: Multiple Choice List Box

Post by peebee » 2017-09-06 01:16

Look in your_tablename_dml.php

Here's an example of what you're looking for

Code: Select all

	// combobox: your_field_name
	$combo_your_field_name = new Combo;
	$combo_your_field_name->ListType = 3;
	$combo_your_field_name->MultipleSeparator = ', ';
	$combo_your_field_name->ListBoxHeight = 10;
	$combo_your_field_name->RadiosPerLine = 1;
	if(is_file(dirname(__FILE__).'/hooks/tablename.your_field_name.csv')){
		$your_field_name_data = addslashes(implode('', @file(dirname(__FILE__).'/hooks/tablename.your_field_name.csv')));
		$combo_your_field_name->ListItem = explode('||', entitiesToUTF8(convertLegacyOptions($your_field_name_data)));
		$combo_your_field_name->ListData = $combo_your_field_name->ListItem;
	}else{
		$combo_your_field_name->ListItem = explode('||', entitiesToUTF8(convertLegacyOptions("Edit Your Options;;Option 1;;Option 2;;Option 3;;Option 4;;Option 5")));
		$combo_your_field_name->ListData = $combo_your_field_name->ListItem;
	}
The line to add to/edit your multiple choices is this one below. Separate the options with a ;;

Code: Select all

$combo_your_field_name->ListItem = explode('||', entitiesToUTF8(convertLegacyOptions("Edit Your Options;;Option 1;;Option 2;;Option 3;;Option 4;;Option 5")));

gatenet
Posts: 14
Joined: 2016-07-26 09:34
Location: Greece
Contact:

Re: Multiple Choice List Box

Post by gatenet » 2017-09-18 20:20

Thank you my friend

Post Reply