Jump to content
Sign in to follow this  
Altair

How to add Default Value in "Sort By" dropdown.

Recommended Posts

You may use JS to force change the options. Here's how, I used the Lost and Found RMA based from your example:
image.png.dbd780f04f555fac4ddb730050ffeecc.pngimage.png.490b42d30a20b45f1090a93440909169.pngimage.png.79b7778644a99f92a80bf5b37984631a.png

Here's the code that you can use:
To remove the option entirely:

<script type="text/javascript">
document.addEventListener('DataPageReady', function (event) {
	document.querySelector("#asorting > option:nth-child(1)").remove();

});
</script>



To set a default blank value:

<script type="text/javascript">
document.addEventListener('DataPageReady', function (event) {

       document.querySelector("#asorting > option:nth-child(1)").innerHTML = "Default";
});
</script>


Hope this helps!
 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...