"Please choose one" non-selectable default item in dropdown list?
Is there any way to set a default value in a dropdown list?
I would like the first field to say "please choose one". It isn't really a valid selection just a notification to the user that they need to select one of the items in the list. So not only should there be a default item but it should not be selectable.
I added a property desciprtion for now, which helps, but I'd prefer to have it displayed as the first non-selectable item (default).
If I were building the list myself I could do this easily. It isn't the markup I'm struggling with but how to get Contour and prevalues to create that markup.
We should add an easy way of making that possible but for now it should be simple to take the existing dropdown sourcecode and set the text of the first option to "please choose one"
Sourcecode for all default components including fieldtypes can be found here
Please guys could you add an option to contour to do this.
Amir - Thanks for your solution it worked, though i have an empty <option></option> above 'please select' so its possible for the user to select a blank option, anyhow its close enough for me. Thanks very much for putting a quick fix to this.
As you see there are lots of folders from previous meetings in 2011, 2010 and 2009. How can make accessible archive for those folders? Like when people want to go to 2011 folder and see the list of meetings. Im not a professional IT person so please try to use easy language when explaining:)
"Please choose one" non-selectable default item in dropdown list?
Is there any way to set a default value in a dropdown list?
I would like the first field to say "please choose one". It isn't really a valid selection just a notification to the user that they need to select one of the items in the list. So not only should there be a default item but it should not be selectable.
I added a property desciprtion for now, which helps, but I'd prefer to have it displayed as the first non-selectable item (default).
How would this be done?
cheers,
doug.
You could add this to the item you'd like to be disabled with javascript:
Sorry, forgot one bit: <option disabled="disabled" selected="selected">please choose one</option>
If I were building the list myself I could do this easily. It isn't the markup I'm struggling with but how to get Contour and prevalues to create that markup.
Any ideas?
cheers,
doug.
Any ideas?
I don't have enough experience with Contour to help you, however, it could quite easily be done with some jQuery.
Comment author was deleted
Hi Doug,
We should add an easy way of making that possible but for now it should be simple to take the existing dropdown sourcecode and set the text of the first option to "please choose one"
Sourcecode for all default components including fieldtypes can be found here
http://our.umbraco.org/projects/umbraco-contour-shared-source
Thanks, Tim. Hope it can be added soon.
I was afraid it would require a source edit. I may look into jQuery as Sebastiaan suggested.
cheers,
doug.
Hey Doug, were you able to find a solution for this?
No, it wasn't worth the time/money to the client for the project that wanted it.
Do let us know if you resolve it!
cheers,
doug.
I'm not 100% how Contour applies value attributes to dropdown lists, but here's the way you'd do it with jquery.
list:
jquery, dont forget to include the library:
Please guys could you add an option to contour to do this.
Amir - Thanks for your solution it worked, though i have an empty <option></option> above 'please select' so its possible for the user to select a blank option, anyhow its close enough for me. Thanks very much for putting a quick fix to this.
Ok, Trying to get answer form Doug here;)
Hi Douglas,
My question goes to you, hope you are still there after the last year old answer;)
My question is about archiving old info, like folders from meetings, presentations, news articles by months and year.
What I mean you can see on our web http://www.nucc.no/activities.aspx
As you see there are lots of folders from previous meetings in 2011, 2010 and 2009. How can make accessible archive for those folders? Like when people want to go to 2011 folder and see the list of meetings. Im not a professional IT person so please try to use easy language when explaining:)
We use umbraco version 4.5.2.
Hope to hear from you soon.
Thanks
Julia
is working on a reply...