checkbox asp.net

ciscom pro asked 3 years ago

http://beta.vans4lease.co.uk/contact - checkbox cannot be clicked (v4.7.4)

https://www.ovl.co.uk/contact - checkbox can be click OK (v4.4.1)

So how come works v4.4.1 but not latest v4.7.4?


ciscom pro answered 3 years ago

No nothing, just MDB running on asp.net. And the odd thing it works fine at www.ovl.co.uk which is similar site for same company.


Bartłomiej Malanowski staff commented 3 years ago

Can you compare these two pages and see what's the difference?


ciscom pro answered 3 years ago

I have tried that code on http://beta.vans4lease.co.uk/contact but it still does not work. Works fine on HTML page not asp.net. But it works on asp.net page here https://www.ovl.co.uk/contact

Maybe I will have to disable the MDB checkbox and have a standard checkbox. How can I do that?


Bartłomiej Malanowski staff commented 3 years ago

Did you add any custom css/js code?


ciscom pro answered 3 years ago

I have updated the Label for ID name but still not selectable. Any ideas?

<label class="custom-control-label" for="MainContent_CheckBoxMarketingFP">I would like to receive the latest Vans4Lease offers</label>

Bartłomiej Malanowski staff commented 3 years ago

I've changed your structure a little bit and it seems to work. Please check my snippet: https://mdbootstrap.com/snippets/jquery/bartek-malanowski/436694


There's one problem with your code. Let's take a look at your code:

<div class="custom-control custom-checkbox">
    <span class="custom-control-input"><input id="MainContent_CheckBoxMarketingFP" type="checkbox" name="ctl00$MainContent$CheckBoxMarketingFP"></span>
    <label class="custom-control-label" for="CheckBoxMarketingFP">I would like to receive the latest Vans4Lease offers</label>
</div>

Your input's ID is MainContent_CheckBoxMarketingFP while the label is looking for CheckBoxMarketingFP. Everything should work after you change the "for" to the ID used by your input


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.7.3
  • Device: All
  • Browser: All
  • OS: All
  • Provided sample code: No
  • Provided link: Yes