FYI, this does not work. All the other field types work this way, and this is what the demo shows, but it does nothing.
public function setUp() {
$this->addSettingFields(
[
‘type’ => ‘toggle’,
]
);
}
Hi,
I think you are looking for a tutorial for collapsible sections. Basically you just set non-true value to the collapsible section argument. Check out the code examples of sections in advanced usage.
Hope this helps.
Thank you for the response.
I’m actually referring to the “toggle” feature under “Bundled Custom Field Types.” The description is as follows:
toggle – lets the user toggle a switch button.
I’m unable to find any working examples of it, and the ones I do see in the demo don’t seem to work. type=”toggle” doesn’t do anything for me.
Ah, I see.
You are talking about the one shown in the custom field types.
Please refer to the FAQ item, Custom field types do not seem to show up. What did I do wrong?
-
This reply was modified 9 years ago by
miunosoft. Reason: formatting the link
Thank you! I was able to make it show up this way.