Page 1 of 1

Changing the default field for data entry in a table

Posted: 2013-06-02 15:13
by shasta59
Have you said to yourself - "I wish field so and so was the the first field selected for data entry."

Or, have you created your own custom detail view and the first field you created in AppGini is no longer the first field.

Well here is how to change it.

First open the "yourtablenameDV.html" file

Scroll to the very bottom and look for the following:

<div id="fieldDescription" class="fieldDescription" onclick="this.style.visibility='hidden';">&nbsp;</div>

<script>
if(document.getElementsByName('
fieldname').length){
document.getElementsByName(
fieldname')[0].focus();...


Change the text in read from the existing field name to the field you wish to have as the highlighted field upon opening the form. Be mindful of the quotation marks etc. Also spelling really counts so make sure you match the field name exactly when typing in the new field name.

I am also using javascript to check the contents of a field when the user moves to the next field. I got tired, in some instances, of users putting in what they thought was funny information for the name field and others. So now it checks for disallowed information in certain fields such as putting Mickey Mouse in the name field.

Enjoy

Alan

Re: Changing the default field for data entry in a table

Posted: 2013-06-02 20:03
by KSan
Super! Thanks much yet again. Great tip.