You should use conditions when you're setting up the checkbox lists. For a checkbox list, you want to only show it if the dropdown has a specific value correct?
thanks for your reply. As far as I understand this is part of Umraco Forms. I'm not using Umbraco Forms.
By now I managed to get to show the Kategory - Skills level structure by simply Building an own node on home level and displaying these in a foreach Loop in my form.
Options List in a contact form
Hi there,
I am stuck with a problem:
I have a Contact Form in an partial view. Now I need a 2-level List where different options can be picked:
Any ideas?
You should use conditions when you're setting up the checkbox lists. For a checkbox list, you want to only show it if the dropdown has a specific value correct?
Hi Shola,
thanks for your reply. As far as I understand this is part of Umraco Forms. I'm not using Umbraco Forms.
By now I managed to get to show the Kategory - Skills level structure by simply Building an own node on home level and displaying these in a foreach Loop in my form.
Here is my Code in the _contactEx.cshtml
My Problem now is how to get the values of the checkboxes in my controller.
Any ideas?
OK, solved!
for collecting the hardcoded checkbox values in the controller you just need to keep the name of the checkboxes the same.
First you write the following line in the Model:
model.cs:
In your form.cshtml you create your checkboxes, make shure the name attribute stays the same for all checkboxes:
form.cshtml:
In your controller.cs you just need to collect the value and like in my example Loop through the values to write them in the response email body:
Controller.cs:
Cheers
is working on a reply...