❔ Why isn't my form being submitted?
As far as I can see, my form is not being submitted because the HabitType is null (there must be something wrong with the section and option tags but I can't tell)
Basically, the user is supposed to log their habits through a form which will insert the values into the database.
Select and option tags will make the user choose which kind of habit he will log (the HabitLog class contains a HabitType property), the foreach loop will loop through each habit type which exists. The other two ones are for the user to log the date and quantity. Appreciate any help!
LogHabit.cshtml:
https://pastebin.com/CFusfz41
LogHabit.cshtmlcs:
https://pastebin.com/JED3jAMP
HabitLog class:
https://pastebin.com/CJ1HK88K
HabitType class:
https://pastebin.com/Ly8Qtg0i
Basically, the user is supposed to log their habits through a form which will insert the values into the database.
Select and option tags will make the user choose which kind of habit he will log (the HabitLog class contains a HabitType property), the foreach loop will loop through each habit type which exists. The other two ones are for the user to log the date and quantity. Appreciate any help!
LogHabit.cshtml:
https://pastebin.com/CFusfz41
LogHabit.cshtmlcs:
https://pastebin.com/JED3jAMP
HabitLog class:
https://pastebin.com/CJ1HK88K
HabitType class:
https://pastebin.com/Ly8Qtg0i
Pastebin
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Pastebin
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Pastebin
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Pastebin
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.