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.
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.
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.
Riccardo
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
Riccardo