I am using 12 short text_input in a row.
In this situation, the suggestion “Press Enter to Apply” is scrambled.
I would like to avoid having this appearing on the screen.
Is it possible to disable this?
Thanks,
Michel
+1
same problem here, can one edit/disable/customize that piece of text in the st.text_input
components?
I have added this below code in a separate css file and it works fine for me
.css-pxxe24 {
visibility: hidden;
}
this disables “Press Enter to Apply”.
Is there any way we can make this a simple parameter
how does css interact with a framework in python ??
Dear @Dhanish_Mohd ,
I am desperate to get rid of the “Press Enter to submit form” text of the text_input in streamlit.
I tried to implement your solution my Python code directly via
hide_submit_text = ‘’’
.css-pxxe24 {
visibility: hidden;
}
‘’’
st.markdown(hide_submit_text, unsafe_allow_html=True)
However, this doesn’t bring out any change for me.
I would highly appreciate any suggestion for me what to do.
All the best!
use this:
div[data-testid="InputInstructions"] > span:nth-child(1) {
visibility: hidden;
}
#Paste the below code after form
import streamlit.components.v1 as components
components.html(
“”"
<script>
const inputs = window.parent.document.querySelectorAll('input');
inputs.forEach(input => {
input.addEventListener('keydown', function(event) {
if (event.key === 'Enter') {
event.preventDefault();
}
});
});
</script>
""",
height=0
)
i have the same doubt how to remove press enter to apply
the above css method not working to disable the press enter to apply
Perfect !
It works 100% for me!