You are viewing limited content. For full access, please sign in.

Question

Question

Set an un-selectable default description in a drop-down menu

asked on August 27, 2018

In forms, how do I set an un-selectable default description in a drop-down menu? For e.g. if it is a drop-down for States, 'Select a State' the default option should be un-selectable.

0 0

Answer

SELECTED ANSWER
replied on August 27, 2018 Show version history

The following sample Javascript can do this.

$(document).ready(function () {
	$('#Field93 option[value="choice 1"]').prop('disabled', true);
});

You'll need the ID of your field (in the example below, it's Field93) and the value of your option, which you can find using your browser's inspection tool:

1 0
replied on August 27, 2018

Thank You! Let me check if this works if the dropdown is dynamically populated from a lookup rule.

0 0
replied on August 27, 2018

Oh, yeah, in that case you might need a different selector for the option.

0 0
replied on October 1, 2018

If I give the Default Value as 'Select a State' as given in the Screenshot and append results to it from the Look up Rule,  the Default Value shows up as the last item in the drop down instead of it being the first item.

Recently upgraded to 10.3 and do  not see the option to select 1 as the Default Value.

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.