Label "for" and input "id" do not match

Label "for" and input "id" do not match

dkdkddkdkd Posts: 4Questions: 2Answers: 0

My project is admittedly somewhat complicated, and maybe I've screwed something up along the way. The data is coming from the PHP libraries, and there are several joins that serve to complicate things. That being said, the issue I'm having is that the <label for="_____"> attributes are not matching the <input id="_____"> attributes. They're close, but the difference is between a period and dash:

  • <label data-dte-e="label" class="DTE_Label" for="DTE_Field_items.purchase_date">
  • <input id="DTE_Field_items-purchase_date" type="text">

Any help would be much appreciated for this (albeit relatively minor) inconvenience. Thanks!

Answers

  • bindridbindrid Posts: 730Questions: 0Answers: 119

    one is dot purchase, t he other is dash purchase

  • dkdkddkdkd Posts: 4Questions: 2Answers: 0

    Bindrd, yes. What I'm at a loss for is why that's the case. These are being automatically generated by the javascript:

    editor = new $.fn.dataTable.Editor({
        ajax: 'php/dt_items.php',
        table: '#items',
        template: '#customform',
        fields: [
            { label: 'Item Name', name: 'items.itemname' },
            { label: 'Quantity', name: 'items.quantity' },
            { label: 'Purchase Date', name: 'items.purchase_date' },
    ...
    

    I am using a custom template, but even when I stop and go back to the default editor, the problem persists.

  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin

    That's a bug I'm sorry to say. It can be seen in this example as well. Thanks for pointing this out! The next version of Editor will contain a fix.

    Allan

  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin

    Just to confirm - this fix will be in Editor 1.6.4 which will be available next week.

    Regards,
    Allan

This discussion has been closed.