Submit button and Results

I am trying to move the submit button to the right of the search dropdown rather than below. Center header and results

Any help would be appreciated.

See attached


Hope this code, kindly supplied by the very generous and ever helpful Stephen Chapman and tweaked with the help of ChatGPT, which moves the Search and Reset buttons from below to beside the Search field helps in some way.

(document).on(‘knack-view-render.view_XXXX’, function(event, view, record) {

const searchButton = $(#${view.key} button[type="submit"]);
const resetButton = $(#${view.key} .kn-clear-search);
const searchInput = $(#${view.key} .kn-search-filter:first);

// Move the Search and Reset buttons to the same line as the search field
searchInput.append(searchButton);
searchInput.append(’ '); // Add space between the buttons
searchInput.append(resetButton);

// Remove the previous container holding the buttons to eliminate extra space
const originalButtonContainer = $(#${view.key} .kn-submit);
originalButtonContainer.remove(); // Use hide() if you want to just hide it instead of removing it

});

1 Like