I have found a way how you can do it, but you need to modify the view for the FieldType.DropDownList. In Contour have have the option to set an default value. like the screenshot shows below. The FieldType.DropDownList.cshtml file is located here: /Umbraco/Plugins/umbracoContour/Views
To get this working for DropDownList, you simply need to add @Model.Value to the empty option tag.
You´re welcome. Happy that I could help you. - Could you please mark the questions as solved. You do it by clicking the little green tick in my post. What this does is the question is mark as solved, and people that came accross this post can go directly to the solution, and see what worked for you.
Keep in mind that you can´t change the marked question once you have set it.
hey dennis i need ur help i must make a web site about car sales and buying and i need all catecories and models about cars maybe someone have it written and gives me pls :S
hey boys i need ur help i must make a web site about car sales and buying and i need all catecories and models about cars maybe someone have it written and gives me pls :S
This worked like a charm and seems to be the intended functionality of the DropDownList. Perhaps this update should make its way to Umbraco Forms core.
Contour DropDownList select value by default
Hi friends,
Can someone help figure it out how can I set a particular value of a dropdownlist to be selected by default in the form.
For exmaple, I have a dropdown list with these values
Hi Simon.
I have found a way how you can do it, but you need to modify the view for the FieldType.DropDownList. In Contour have have the option to set an default value. like the screenshot shows below. The FieldType.DropDownList.cshtml file is located here: /Umbraco/Plugins/umbracoContour/Views
To get this working for DropDownList, you simply need to add @Model.Value to the empty option tag.
So you simply change this:
To the following:
Just keep in mind that you maybe need to do these changes again if you update Contour to a newer version late on.
Hope this helps,
/Dennis
Thank you Dennis.
Appreciate your help!
I will try it out.
Regards
It worked :)
Thanks
Hi Simon,
You´re welcome. Happy that I could help you. - Could you please mark the questions as solved. You do it by clicking the little green tick in my post. What this does is the question is mark as solved, and people that came accross this post can go directly to the solution, and see what worked for you.
Keep in mind that you can´t change the marked question once you have set it.
And once again, happy that it worked for you.
/Dennis
hey dennis i need ur help i must make a web site about car sales and buying and i need all catecories and models about cars maybe someone have it written and gives me pls :S
Cheers
hey boys i need ur help i must make a web site about car sales and buying and i need all catecories and models about cars maybe someone have it written and gives me pls :S
This worked like a charm and seems to be the intended functionality of the DropDownList. Perhaps this update should make its way to Umbraco Forms core.
is working on a reply...