From 0142611a26ccc8f886edb1d3a04429180b91562f Mon Sep 17 00:00:00 2001 From: "Ap.Muthu" Date: Thu, 17 Mar 2016 17:57:20 +0000 Subject: [PATCH] Updated Technical Wiki (markdown) --- Technical-Wiki.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Technical-Wiki.md b/Technical-Wiki.md index ecc07e5..e3f58e5 100644 --- a/Technical-Wiki.md +++ b/Technical-Wiki.md @@ -152,3 +152,27 @@ $field = Array foreach ($row as $key => $val) { if (isset($names[$key])) { ```` +* Hide Auto-increment Primary Key in New Record Form +```` + function fieldName($field, $order = 0) { +.. +.. +.. + // Hide AutoInc Primary keys during Insert + if (isset($_GET['edit'])) { + $hidePKfields = Array( + Array('htable' => 'cheques', 'hfield' => 'ChqID') + , Array('htable' => 'chq_batches', 'hfield' => 'ORID') + ); + foreach ($hidePKfields as $val) { + if ($_GET['edit'] == $val['htable'] && $field['field'] == $val['hfield'] && !isset($_GET['where'][$val['hfield']])) + return ""; + } + } +.. +.. +.. + return ""; + } + +````