OPNsense Forum

English Forums => Development and Code Review => Topic started by: lattera on June 08, 2020, 11:10:34 pm

Title: Confused about InterfaceField select_multiple dropdowns
Post by: lattera on June 08, 2020, 11:10:34 pm
I'm writing some enhancements to OPNsense and am somewhat stuck. I'm including two screenshots. I've modeled my "Interfaces" dropdown to be similar to that of the IDS "Interfaces" dropdown. For some reason, my dropdown isn't populating, except until I click the "Clear All" link. Upon clicking that link, the relevant interfaces appear.

I've hit my head against the wall for a couple days now and I can't figure out what's going on. I'm hoping someone has hit this similar issue and has some pointers. I also don't see any javascript errors nor network errors (all responses are HTTP 200 OK.)

In case the attached images fail to work here, I've uploaded the screenshots here: https://imgur.com/a/qNLseS7

(Apparently, the screenshots exceed the max allowed size, so please use that imgur link above.)
Title: Re: Confused about InterfaceField select_multiple dropdowns
Post by: lattera on June 11, 2020, 04:18:39 pm
A few days later, I'm still just as puzzled. Does anyone have any ideas?
Title: Re: Confused about InterfaceField select_multiple dropdowns
Post by: lattera on June 12, 2020, 11:08:35 pm
I got it working in a weird way. I had to add:

Code: [Select]
<style>tokenize</style>

to the setting in question in the core.git/src/opnsense/mvc/app/controllers/OPNsense/product/forms/generalSettings.xml

I've attached a screenshot.
Title: Re: Confused about InterfaceField select_multiple dropdowns
Post by: mimugmail on June 12, 2020, 11:24:06 pm
Screenshot looks strange. My advise would be, install ALL plugins, click around all features, then look at their models and Forms. You'll quickly find where to look if you dont know further :)