• I’m new to using the AdminPageFramework but am thoroughly enjoying it so far. I’m kinda stumped. I’m trying to create a Settings page that has tabs and inside one of the tabs are collapsible sections. Inside each of those collapsible sections, I want a set of sortable collapsible sections (subsections) that contain fields that are unique for each of the subsections. The structure would look something like:

    Settings
       +-->General (Tab)
       |   +-->Sections & fields
       +-->Forms (Tab)
       |   +-->Form 1 (Collapsible Section)
       |   |   +-->Field 1 (Sortable Collapsible Section)
       |   |   |   +-->Field 1 Attribute 1 (checkbox)
       |   |   |   +-->Field 1 Attribute 2 (text)
       |   |   |   +-->more fields
       |   |   +-->Field 2 (Sortable Collapsible Section)
       |   |   |   +-->Field 2 Attribute 1 (radio)
       |   |   |   +-->Field 2 Attribute 2 (checkbox)
       |   |   |   +-->Field 2 Attribute 3 (text)
       |   |   |   +-->more field
       |   |   +-->Field 3 (Sortable Collapsible Section)
       |   |   |   +-->more fields
       +-->Notifications (Tab)
       ...

    The Forms tab is the one of interest. Hopefully you get the idea. Can this be done with AdminPageFramework? How would I go about making it happen?

    Thanks in advance so much.

Viewing 1 replies (of 1 total)
  • Plugin Author miunosoft

    (@miunosoft)

    That’s not natively supported with the current design, sorry. You need to make the sections sortable with a JavaScript script and sort the section definition array by yourself.

    I’ve posted an example plugin. When you generate your own build of the framework files, you need to replace admin-page-framework with your text domain in the example file, custom-sortable-sections.js.

Viewing 1 replies (of 1 total)
  • The topic ‘Sortable Subsections’ is closed to new replies.