# Submit button and Results

**URL:** <https://forums.knack.com/t/submit-button-and-results/7635>\
**Category:** API & Custom Code\
**Created:** [May 16, 2016, 6:39pm UTC](https://forums.knack.com/t/submit-button-and-results/7635 "2016-05-16T18:39:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anthony26193](https://avatars.discourse-cdn.com/v4/letter/a/91b2a8/32.png) [@Anthony26193](https://forums.knack.com/u/Anthony26193)\
**Post date:** [May 16, 2016, 6:39pm UTC](https://forums.knack.com/t/submit-button-and-results/7635/1 "2016-05-16T18:39:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Dean2](https://avatars.discourse-cdn.com/v4/letter/d/bcef8e/32.png) [@Dean2](https://forums.knack.com/u/Dean2)\
**Post date:** [September 13, 2024, 9:58pm UTC](https://forums.knack.com/t/submit-button-and-results/7635/2 "2024-09-13T21:58:23Z")

</div>

Hope this code, kindly supplied by the very generous and ever helpful [Stephen Chapman](https://forums.knack.com/u/StephenChapman/summary) 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(’&nbsp;'); // 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

});
