- $sql = "select id, type, label, required from tt_custom_fields where group_id = $group_id and status = 1 and type > 0";
+ $sql = "select id, type, label, required from tt_custom_fields".
+ " where group_id = $group_id and org_id = $org_id and status = 1 and type > 0";