Customize chosenbox emptymessage styling

asked 2014-10-28 18:22:26 +0800

eclipse2 gravatar image eclipse2
17 4

I want to use empty message of chosenbox with a diferent styling of the user input, but there is no css class to distinguish both. Here is one image of what I need to do: h**p://i61.tinypic.com/2zsbhw0.png

Zk Team, can you extend the chosenbox to allow this behavior? If not, how I can archive this behavior?

Thanks a lot,

Waiting for one reply,

delete flag offensive retag edit


If you still have issues extending chosenbox, please contact [email protected].

vincentjian ( 2014-11-04 08:32:47 +0800 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2014-11-02 10:21:33 +0800

Darksu gravatar image Darksu
1991 1 4

Hello eclipse2,

You could extend the chosenbox and create your own implementation as you can see at the following url:


Futhermore at the following url you can find more information on Extending and Customizing a ZK Component as a Separate Component:


Best Regards,


link publish delete flag offensive edit

answered 2014-11-13 10:04:31 +0800

eclipse2 gravatar image eclipse2
17 4

I made one trick that can simulate the placeholder using css.

.z-chosenbox {
&-input {
    .fontStyle (@baseContentFontFamily , @fontSizeMedium , normal , @colorInputTextColorPlaceholder);
    font-style: italic;
    &:focus {
        .fontStyle (@baseContentFontFamily , @fontSizeMedium , normal , @baseTextColor);
        font-style: normal;

On loose focus, the default behavior of ZK is delete in wrong text placed by user. What I do is add the italic styling has one placeholder, and on focus remove the placeholder styling.

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

1 follower



Asked: 2014-10-28 18:22:26 +0800

Seen: 17 times

Last updated: Nov 13 '14

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More