• Hi
    I tried to use this filed in RTL website. However, the max value is on left and min is on right.
    How can I change it?

    2- If I want to modify the min and max based on other value (e.g. if filed 1 in page 1 > 5000, then min is 1500, etc.) how this could be implemented?

    Thanks

Viewing 1 replies (of 1 total)
  • Thread Starter mansours

    (@mansours)

    Hi
    for first question, I meant The opposite.
    The current situation “Max to the right and Min to left”
    What It should be in RTL site: “Max to the left and Min to right”
    I think the CSS and Javascript need to up dated so when I move the slider to the left it increase the number. I could not figure this out.

    for the second question, here is how you modify the min and max:

    
    //formid = 1
    //first slider filed = 1
    //second slider filed = 2
    add_filter( 'gform_pre_render_1', 'set_rangeMinMax' );
    add_filter( 'gform_pre_process_1', 'set_rangeMinMax' );
    function set_rangeMinMax( $form ) {
        foreach ( $form['fields'] as &$field ) {
            if ( $field->id == 1) {
    			$field->rangeMin = 800;
            }
    	elseif( $field->id == 2){
    		if ($_POST["input_1"] > 800){
    			$field->rangeMax = 800;
    		}
    	}
        }
        return $form;
    }
    

    please validate.
    thanks

    • This reply was modified 4 years, 11 months ago by mansours.
Viewing 1 replies (of 1 total)
  • The topic ‘RTL Support’ is closed to new replies.