"Slider" meta field to save 'min' and 'max' selected value

Support General "Slider" meta field to save 'min' and 'max' selected valueResolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #13227
    aristoaristo
    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.

    #13334
    Anh TranAnh Tran
    Keymaster

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

    #13512
    Anh TranAnh Tran
    Keymaster

    It's done in the recent commit.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.