It is called option list and its a core/attribute. Hope you can use it!
Thanks! I knew it was somewhere, just wasn't seeing it in the html_form.inc file so I just needing help in the right direction.
Need a little bit more help if possible to understand how it works. I am using this in creating a new Trigger Action, so I won't be using XML to create this interface.
I can easily print the core attribute using:
$device_token = array_get_index($settings, 'airship_device_token', '');
$option_list = new Asset_Attribute_Option_List(0, $device_token);
$option_list->setEditParam('width', 85);
$option_list->paint($prefix.'[airship_device_token]');
But my problem is being able to save those values and show them again after the screen is saved. I am sure I need to do this in the processInterface function, but not sure how. A few other assets I found did the following, but I can't get it to work for me when adjusting for my code:
$option_list = new Asset_Attribute_Option_List(0, NULL, SQ_OPTION_LIST_DELIMITER_UNIX);
// We assume namining of these constants, and that they always have white/black lists.
$message_types = Array(
‘LOG_TO_FILE’,
‘LOG_TO_DB’,
‘SEND_MAIL’,
);
foreach ($message_types as $message_type) {
// Names for both white and black list for this message type.
$w = ‘SQ_MS_’.$message_type.‘WHITE_LIST’;
$b = 'SQ_MS’.$message_type.’_BLACK_LIST’;
// Process attribute. Value is string seperated by newlines (\n).
$option_list->process($w);
$_POST[$class][$w] = $option_list->value;
$option_list->process($b);
$_POST[$class][$b] = $option_list->value;
}
Do I need to somehow post my values like it is being done here?