user input form in plugin?

I’m new to both plex and python and have a few questions I haven’t been able to find solutions for:



After adding preferences to a plugin I was playing with I noticed that the form that pops up has different field types (boolean, enum, strings etc); is there any way to build a similar form for other purposes (prompt the user for information, or pass through web forms)?



I can emulate some of this functionality just by using the PopupDirectoryItem and the InputDirectoryItem, but I can’t do the boolean option as effectively, furthermore the return chain becomes unmanageable - if there is there some way to override where the back functionality (the menu button) goes to I could create a looping menu that keeps passing a dict of the settings until it is submitted (without having to back through all the iterations to escape the plugin).

Not at the moment, no. We’ll be looking in to adding features like this in future, but the current plug-in stuff is kind of “slotted in” to the old XBMC GUI, and we want to reorganise & streamline this a bit before extending any more features to plug-in developers :slight_smile:



You can affect the “back” functionality by setting the noHistory or replaceParent attributes on the MediaContainer to True. noHistory means that the current directory isn’t added to the history stack, and replaceParent indicates that the previous directory should be replaced by the current one in the stack.

I’d like to cast my vote for form capabilities; and thanks for the tip on noHistory, it is turning into a manageable workaround for simple user input.



Is there any way to set the position (highlighted menu item) when a directory is loaded? plex does a fantastic job of remembering where I left off, but it’d would be nice to be able to control this.



I played a bit with the popupmenuitem, and have been unable to get them to daisy chain, if I create a popup inside of an container that is a popup, the second popup opens as a regular directoryitem. the makes some sense to me since it would be awkward to have a popup on top of another popup, but I’d love to be able to replace the existing popup with a new one.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.