Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Select option box with prompts

b
Contributor
April 18, 2012

Hi,

I have the following code:

<select id="users" name="user" multiple="multiple" class="multi-select" size="6">								
	#foreach ($user in $action.getAllUsers())							
		<option value="$user.name">$user.displayName ($user.emailAddress)</option>
	#end
</select>

and I want to make promts for user option. It means after I mark option there should be displayed description in something like "dialog box". How could I do this? Is there any atlassian helper, or helpful jquery opensource library?

1 answer

1 vote
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 19, 2012

Is the description in a dialog box very user-friendly? You'd need some option to say "don't tell me again".

In the behaviours plugin you can write text under the field where the errors would go, you don't have to use the plugin, but the code is like:

field.parent().find("div.jbhverror").remove();
var helpDivs = field.parent().find("div.error:last");

var bhvError = '<div class="error jbhverror">' + behaviours[fieldname]["helpText"] + '</div>';
if (helpDivs.length > 0) {
	helpDivs.prepend(bhvError);
}
else {
	field.parent().append(bhvError);
}

So you just need a handler for when the user clicks on one of the options. If I understood you right.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events