-
Notifications
You must be signed in to change notification settings - Fork 585
Closed
Description
Hi, I want to display some checkbox fields only if the parent typography filed's font-family equals to any of the google fonts. Below is the sample code:
array(
'id' => 'heading_font',
'type' => 'typography',
'title' => 'Headings',
'output' => array('h1','h2','h3','h4','h5','h6'),
'font-weight' => false,
'font-style' => false,
'text-align' => false,
'line-height' => false,
'color' => false,
'font-size' => false,
'google' => true,
'subsets' => true,
'preview' => array(
'text' => 'Heading Preview',
'font-size' => '30px',
'always_display' => true
),
'default' => array(
'font-family' => 'Open Sans',
'color' => '#000000',
'font-size' => '30px',
'google' => true,
)
),
array(
'id' => 'checkbox_1',
'desc' => 'checkbox_1',
'type' => 'checkbox',
'required' => array('paperplane_heading_font_options', 'equals', 'Overlock')
),
array(
'desc' => 'checkbox 2',
'id' => 'checkbox_2',
'type' => 'checkbox',
'required' => array('heading_font', 'equals', 'Overlock')
),
But the above code does not work, the checkbox fields are hidden but even after changing the font-family to Overlock, checkbox fields won't appear. Could you guys please provide me the solution.
Metadata
Metadata
Assignees
Labels
No labels