Skip Navigation

[Resolved] how to set the price slider value once search results is displayed

This support ticket is created 6 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 3 replies, has 2 voices.

Last updated by Shane 6 years, 11 months ago.

Assisted by: Shane.

Author
Posts
#603082

how to set the price slider value once search results is displayed/Refreshed, document.ready() is not working, I could not get the value from the field

code:
$( document ).ready(function() {
$('#price-slider').slider('values', [
parseInt($('#wpv_control_textfield_min-price').val()),
parseInt($('#wpv_control_textfield_max-price').val())
]);
});

I have checked : Full page refresh when visitors click on the search button

#603179

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hello,

Thank you for contacted our support forum.

Actually you will need to add it to a callback function so that the slider loads again.

jQuery( document ).on( 'js_event_wpv_parametric_search_form_updated', function( event, data ) {
	/**
	* data.view_unique_id (string) The View unique ID hash
	* data.view_changed_form (object) The jQuery object for the View form after being updated
	* data.view_changed_form_additional_forms_only (object) The jQuery object containing additional forms from other instances of the same View inserted using the [wpv-form-view] shortcode
	* data.view_changed_form_additional_forms_full (object) The jQuery object containing additional forms from other instances of the same View inserted using the [wpv-view] shortcode
	*/
	
});

Add the code within that function and let me know if it works then.

Thanks,
Shane

#603482

jQuery( document ).on( 'js_event_wpv_parametric_search_form_updated', function( event, data ) {
/**
* data.view_unique_id (string) The View unique ID hash
* data.view_changed_form (object) The jQuery object for the View form after being updated
* data.view_changed_form_additional_forms_only (object) The jQuery object containing additional forms from other instances of the same View inserted using the [wpv-form-view] shortcode
* data.view_changed_form_additional_forms_full (object) The jQuery object containing additional forms from other instances of the same View inserted using the [wpv-view] shortcode
*/

console.log('test')

$('#price-slider').slider('values', [
parseInt($('#wpv_control_textfield_min-price').val()),
parseInt($('#wpv_control_textfield_max-price').val())
]);

I have done like this but still I could not get the result. More over console.log('test') is not getting printed seems, jQuery( document ).on( 'js_event_wpv_parametric_search_form_updated', function( event, data ) { not working

Note: I have checked : Full page refresh when visitors click on the search button

#603528

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hello,

Would you mind providing me with access tot he site so that I can have a look at this for you ?

The private fields will be enabled for your next response.
Thanks,
Shane