This topic contains 7 replies, has 3 voices, and was last updated by Sean Sean 2 years, 8 months ago.

Problem with class checker


  • iivanov2
    Participant

    Posts: 9
    Member Reply #954

    Hi, I have strange problem with checkboxes.

    If I use

    <label class=”uniform-inline”><div class=”checker”><span><input type=”checkbox” value=””></span></div></label>

    my checkboxes are inactive, I can’t check or uncheck them.

    If I use only:

    <input type=”checkbox” value=””>

    there is not problem, the reason is <span style=”line-height: 1.5;”><div class=”checker”>, how can I slove this problem?</span>

    I am using:
    theme: admin3
    metronic version: 3.5

     

     

     

    Sean
    Sean
    Keymaster

    Posts: 4498
    Support Staff Reply #961

    Hi :),

    You should use the checkboxes only as:

    <input type=”checkbox” value=””/>

    The first code sample you used is not actual checkbox as its the result of uniformjs plugin’s initialization.

    However i am not clear on your issue. Can you please provide us more details ?

    Thanks.

     


    iivanov2
    Participant

    Posts: 9
    Member Reply #997

    What details do you need? What I know is that checkboxes in the template are OK, they work fine, but not in my project, maybe I miss some css or some initialization, but I cannot determ which one, radio buttons do not work too, see this image, they are broken: http://postimg.org/image/7ht66pmoz/

    Could you guide me which css, or js plugins are related with checkboxes and radio buttons, their dependencies to check what I am missing?


    iivanov2
    Participant

    Posts: 9
    Member Reply #999

    Actually this piece of code is from Chrom’s debbuger (when I press F12)

    <label class=”uniform-inline”>
    <div class=”checker”><span><input type=”checkbox” value=””></span></div> Yes
    </label>

    but in the source of the page is only this:

    <label class=”uniform-inline”><input type=”checkbox” value=””/> Yes </label>

    This is strange, I don’t know where the extra tags come from. Anyway I will use only:

    <label class=”uniform-inline”><input type=”checkbox” value=””/> Yes </label>

     

     

    Sean
    Sean
    Keymaster

    Posts: 4498
    Support Staff Reply #1006

    I suspect you have some JS error(probably caused after your modification) in your page which breaks core plugin initialization. I would suggest you to debug your page with chrome’s dev tools. If you need any further assistance please provide a test link to your developing site in a private reply.


    ygroenewald
    Participant

    Posts: 2
    Member Reply #3332

    Hi, I’m experiencing the same problem.

    I’m working with the Metronic 4.0.2 Responsive Admin Dashboard Template.
    Using Knockout foreach binding to render a group of checkboxes from an observable array.
    Problem: All the checkboxes in the group seem to be disabled.
    Hope you can assist in solving this issue.
    HTML at Design time:
    ————————————–

    <div data-bind=”foreach: Attributes”>
    <div class=”col-md-4″>
    <input type=”checkbox” data-bind=”attr: {Id: ‘attribute’ + Id, value: Id}, checked: $parent.SelectedAttributes” />
    </div>
    </div>

    HTML at run-time (first checkbox only):
    ————————————————–

    <div data-bind=”foreach: Attributes”>
    <div class=”col-md-4″>
    <div class=”checker”>
    <span>
    <input type=”checkbox” data-bind=”attr: {Id: ‘attribute’ + Id, value: Id}, checked: $parent.SelectedAttributes” id=”attribute1″ value=”1″>
    </span>
    </div>
    <span data-bind=”text: Name”>Healthcare</span>
    </div>

    </div>


    iivanov2
    Participant

    Posts: 9
    Member Reply #3334

    Don’t copy HTML from the debugger of Chrome, copy it from page source (right click / view page source). Debbuger adds some extra “things” which are not part of the original source.

    Sean
    Sean
    Keymaster

    Posts: 4498
    Support Staff Reply #3343

    Hi,

    Can you provide us a test link to your developing site in a private reply ?
    We will need to check your developing site online in order to investigate your issue.

    Thanks.

You must be logged in to reply to this topic.