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

This topic contains 2 replies, has 2 voices, and was last updated by  Anh Tran 7 months, 2 weeks ago.

  • Creator
  • #13227

    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

        '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 2 replies - 1 through 2 (of 2 total)
  • Author
  • #13334

    Anh Tran

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


    Anh Tran

    It’s done in the recent commit.

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.