Closed Mte90 closed 8 years ago
@Mte90 You're probably using a control of type "combo select". In this case you have to set the options
array key, as shown below:
<?php
$fields = array(
__( 'Sample') => array(
array(
array(
'type' => WPDKUIControlType::SELECT,
'name' => 'combo_select_name',
'label' => __( 'Combo Label' ),
'options' => array(
'' => __( 'Select ...' ),
'first' => __( 'First Item' ),
'second' => __( 'Second Item' ),
'last' => __( 'Last Item' ),
);
'value' => 'second',
)
),
),
);
Correct :-) it's possible add an alert for missing parameter for the controls?
@Mte90 Yes, for explample in the fields flow use:
<?php
...
empty( $profile_display->page_slug ) ? array(
array(
'type' => WPDKUIControlType::ALERT,
'alert_type' => WPDKUIAlertType::WARNING,
'dismiss_button' => false,
'class' => 'arrow-top-left',
'title' => __( 'Warning!' ),
'value' => __( 'You have to set the page profile slug in order to use the shortcode.' ),
)
) : '',
...
I refer an alert in the framework for the developer XD
I get this error in the code my Meta box.