Suggestion
Hey @aristath
I met a complicated scenario but it's not an issue in KIRKI, However i create a new section to change the main website's background so i have 3 options (None, Pattern and Custom Background) in radio buttons and every option must have some nested controls so i want a nested (Divs) with unique Ids inside the current section to show/hide it using jQuery depending on user selection (None, Pattern, Custom).
I search for it but i cannot call add_control function inside Div tag because the div created before initialize add_control.
I tried to use a [custom] type with default value [
I have no ideas right now but i believe it will be a good option for organizing inside sections.
If you have any suggestions i'm all ears, Thanks.
What if you just show/hide controls based on the values of the background-type setting?
You could for example use the required argument (some basic docs can be found on https://github.com/aristath/kirki/wiki/required)
So you can add all your options as separate controls and then decide which ones you're going to show or hide based on the value of others.
It's not nested, but it will get the job done...
WoW, It's working v. well .. but the radio button control's Transport must not postMessage, But it's good. Thanks dude.
Yeah, the transport has to be set to refresh. A small price to pay though... :P I'm glad I could help!