Changing the default field for data entry in a table

Got something cool to share with AppGini users? Feel free to post it here!
Post Reply
User avatar
shasta59
AppGini Super Hero
AppGini Super Hero
Posts: 231
Joined: 2013-01-08 19:40
Location: Calgary, Alberta, Canada

Changing the default field for data entry in a table

Post by shasta59 » 2013-06-02 15:13

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
Calgary, Alberta, Canada - Using Appgini 5.50 -

KSan
AppGini Super Hero
AppGini Super Hero
Posts: 252
Joined: 2013-01-08 20:17

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

Post by KSan » 2013-06-02 20:03

Super! Thanks much yet again. Great tip.

Post Reply