Dev: fix ordering by js.
Dev: must use $fielddetails['fieldname'] for index : unicity