Hide string input using CSS Editor

Hi Everybody,
my first post here, hope to find a solution :slight_smile:

I am trying to hide the input of the string input widget (quickforms) using the CSS editor. Just to give an idea it should look like this:

I would be happy also if the input is not visible, or any other alternatives.

Just to give some background, I would like the user to interactively input a password which is then used as a variable in a python node. As far as a I know the credential node is not useful in this situation and I cannot really think about any other alternative solution.

Thanks in advance!

1 Like

Hey @rmassei88,

I am not aware of an option to solve this with CSS. You of course could make the font size super small, but in theory what you want is to change the type of the input field from text to password and this is not possible with pure CSS. What you could do is to write that widget yourself using the Generic JavaScript View (Example attached in the workflow provided). But keep in mind that this password is in no means secure. It can easily be accessed and if the workflow is saved to disk the password is save in clear text as the value of this flow variable.
The only thing you gain with this approach is that you hide the visual input from the user.

ShowCredentialsInput.knwf (74.6 KB)



Dear @DanielBog,
thanks a lot for your reply, this helps a lot.
I see your point, the password is then visible and accessible. Do you know if this any safe way to input credentials in a python code by keeping them encrypted, any alternative to the credential node? This question can also required a new post.

1 Like

Hi @rmassei88:

Do I understand it correctly that you want to be able to use a Credential in a KNIME node written in Python (as opposed to in the Python Script node)?

Pure-Python nodes have access to credentials, see the get_credentials method in ConfigurationContext and ExecutionContext here Python Extension Development (Labs) — KNIME Python API documentation.

Then you can use the Credentials Configuration – KNIME Community Hub or Credentials Widget – KNIME Community Hub to let the user input username and password, and access those in Python.

Does that help? Best,


Hi @carstenhaubold ,
what I meant is to inject as flow variables username and password in a Python script code using a widget.It is possible to do it using string widget (which do not allowed hiding the password input while typing) but not with credential widget:

Your solution is definetly really elegant and helps, but I do not have much expreience in writing KNIME nodes in Python. In case, I need to look more into it :slight_smile:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.