creativetimofficial / material-bootstrap-wizard

Material Bootstrap Wizard - Bootstrap wizard based on Material Design
http://demos.creative-tim.com/material-bootstrap-wizard/wizard-book-room.html
MIT License
81 stars 79 forks source link

input type radio doesnt return name value upon post request #38

Open ghorochie opened 5 years ago

ghorochie commented 5 years ago

for example <input type="radio" name="gender" value="male"> doesnt work inside a div with a class "choice" and a data toggle "wizard-radio". I know this is the problem of your end because I tried making radio button outside the div and then upon submitting post request of the form, it fetches the data of the radio button. I went into your docs and found out it still has the bug because when I try to inspect element, the input radio is outputted outside the body of the html (where the form doesn't have the coverage) even though it was inside of the div. Please create a solution to this because this kind of front-end style doesn't make a friendly-meet with the back end.

ghorochie commented 5 years ago

Okay to help fellow back end peeps over there. Found out temporary solution.

put an <input type="hidden" outside the wizard-radio div and then have a value of null to it. In your javascript, upon document ready, write an onclick function to the icon div and then set the value of the hidden input to your desired value to fetch that data. Upon submitting the post form, it will now get the value of "suppose-to-be" radio button. This is just a hotfix or what we called hack. This may be disgusting as it doesn't follow any coding ethics but it will suffice.

Do not close this issue until resolved