A mew way of presenting labels in fields

Hi

I notice from the most attractive and clear website deignes that screen real estate is decreased by dropiing the label of a field. Instead, a field when blank has the label in a different colour in the field itself…

So instead of


Search Customer ( )

You have


( Enter Customer Name To Search… )

Where the label is in the field (text box) until the user types something in…

I suppose Servoy doesn’t provide such display options?

Appreciate any comments received…

Cheers
Jonathon

Hi Jonathon,

You could reproduce this behaviour by setting the text and changing the fontcolor to gray when the textfield is empty and then remove the text and change the color when the textfield gets the focus.

Kind regards,

HTML5 has a placeholder attribute. So for web client, when you create a new record you could do this to insert this attribute on various fields:

var wicketID = plugins.WebClientUtils.getElementMarkupId(elements.fld_company_name)	
	var js = "$('#" + wicketID + "').attr('placeholder', 'Enter company name...')"	
	plugins.WebClientUtils.executeClientSideJS(js)

[attachment=0]Screen shot 2012-07-30 at 2.37.58 PM.png[/attachment]

For smart client, we used to do this all the time: http://www.servoymagazine.com/home/2005/12/tip_multiline_l.html

Screen shot 2012-07-30 at 2.37.58 PM.png