• airamnaal

    (@airamnaal)


    I have 2 different selection boxes in wp admin. How can I write a javascript code, that only lets you choose from one selection box?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Abhishek

    (@abhi_wpsupport)

    sorry but could you please try elaborating a bit more ? your description to short to understand anything.

    Thread Starter airamnaal

    (@airamnaal)

    These are my two option boxes to choose from. Client can only choose from one selection and the other will be blocked or forbidden to choose.

    I hope you understand ?? I am bad at describing my problems ??
    `
    $meta_boxes[] = array(
    ‘id’ => ‘product_metabox’,
    ‘title’ => ‘ENERGIAM?RGIS’,
    ‘pages’ => array( ‘kliimaseade_product’, ), // Post type
    ‘context’ => ‘normal’,
    ‘priority’ => ‘high’,
    ‘show_names’ => true, // Show field names on the left
    //’show_on’ => array( ‘key’ => ‘id’, ‘value’ => array(), ), // Specific post IDs to display this metabox
    ‘fields’ => array(
    ‘name’ => ‘Komplektim?rgis 1’,
    ‘desc’ => ”,
    ‘id’ => $prefix .’product_energy_class’,
    ‘type’ => ‘select’,
    ‘options’ => array(
    ‘none’ => __(‘–‘),
    ‘mark-1’ => __(‘A+++’),
    ‘mark-2’ => __(‘A++’),
    ‘mark-3’ => __(‘A+’),
    ‘mark-4’ => __(‘A’),
    ‘mark-5’ => __(‘B’),
    ‘mark-6’ => __(‘C’),
    ‘mark-7’ => __(‘D’),
    ‘mark-8’ => __(‘E’),
    ‘mark-9’ => __(‘F’),
    ‘mark-10’ => __(‘G’),
    ),
    ),
    array(
    ‘name’ => ‘Tootem?rgis 1’,
    ‘desc’ => ”,
    ‘id’ => $prefix .’product_energy_subclass’,
    ‘type’ => ‘select’,
    ‘options’ => array(
    ‘none’ => __(‘–‘),
    ‘mark-11’ => __(‘A++’),
    ‘mark-13’ => __(‘A+’),
    ‘mark-14’ => __(‘A’),
    ‘mark-15’ => __(‘B’),
    ‘mark-16’ => __(‘C’),
    ‘mark-17’ => __(‘D’),
    ‘mark-18’ => __(‘E’),
    ‘mark-19’ => __(‘F’),
    ‘mark-20’ => __(‘G’),
    ),
    )

    etc

    Thread Starter airamnaal

    (@airamnaal)

    basically i need to disable one dropdown when the other is selected.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘select option’ is closed to new replies.