Unhiding the hidden 'hidden input' control in XPages
Tuesday, October 20, 2009 3:14 PM
There is a new control type in 8.5.1 that for some reason is hidden and this is the 'Hidden Input' control. When doing web development it is quite common to include hidden fields on a webpage that are then submitted to the server. In XPages on 8.5.0 there was no easy way to do this, you could create a field and then hide it using CSS but that is not a great solution as when CSS is disabled the field becomes visible.
In XPages in IBM Lotus Domino 8.5.1 you can now directly add hidden input fields to your webpage but the control is not listed with the rest of the core controls, you have to use the 'Other' option to select the 'Hidden Input' control or you can turn it on permanently in the Domino Designer preferences. I've highlighted below where to find it.

You can bind a hidden input to a field in a Notes document in XPages just like you would a normal input and you can write client side javascript and server side javascript to access and change the contents of the field. I'm using this in the name picker in xTalk. When the page where the name picker is shown some client side javascript takes the values in the listbox, puts a semi-colon between the values and adds them as a single string to the hidden field which is bound to a field in the Notes document. The server side javascript then converts the field into a READERS or AUTHORS field as required by the code.
In the screenshot above you might also notice a few other controls that are not enabled by default, they are mostly select explanatory like Line Break, Span, Paragraph and Block Content ( DIV ). I'm still investigating what Output Script does. I'll blog again once I know.