Custom Fields
Re-Envisioned
Support General "Slider" meta field to save 'min' and 'max' selected value

This topic contains 1 reply, has 2 voices, and was last updated by  Anh Tran 2 days, 5 hours ago.

  • Creator
    Topic
  • #13227

    aristo
    Participant

    I’m using the slider meta field and I have set the ‘min’, ‘max’ and ‘step’. I’m using it as age range slider, which will give me the minimum and maximum age bracket. here is the code

    array(
        'id' => $prefix . 'age',
        'type' => 'slider',
        'name' => esc_html__( 'Age Range', 'text-domain' ),
        'js_options' => array(
            'min' => 1,
            'max' => 100,
            'step' => 1,
            'range' => true,
        ),
        'std' => 20,
        'value' => $field['std'],
    ),

    The slider is working in terms of selecting the minimum and maximum. But it’s storing a single value, the one which I selected last (min or max).

    Is there any way you can update your plugin to store both values you are getting from js_options array as comma separated value within a single cell? As I understand it should be a quick fix.

    Can you please update it.

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #13334

    Anh Tran
    Keymaster

    Hi, it’s not supported yet. But there’s a workaround here.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.