top of page

Auto-Run Search Views in Knack


The below code allows you to auto run a search view in Classic Knack


//Search component to auto submit

$(document).on('knack-scene-render.scene_351', function (event, scene) {

// Wait a moment, then click search button in a search view after the scene renders.

setTimeout(function () {

$('#view_621 button[type="submit"]').click();

}, 500); // Milliseconds to wait before click.

});


Sign up to Knack for Free - Affiliate Link


Update the scene and view numbers as required.


Add to JavaScript section - Classic Knack only!

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
  • Black LinkedIn Icon
  • Black Twitter Icon
  • Youtube

©2022 CH Project Support Limited

bottom of page