enter the year as '07' and upon pressing 7 you are in the next field.
Use the javascript onkeypress event. You can assign a keypress event in the fields.ini file using the widget:atts:onkeypress attribute.
e.g.
- Code: Select all
[myfield]
widget:atts:onkeypress="nextField(this)"
And in your javascript file you would define the nextField() function as something like:
- Code: Select all
function nextField(input){
if ( input.value.length > 1 ){
document.getElementById('myNextField').focus();
}
}
The javascript onkeypress event is described here:
http://www.devguru.com/technologies/ecm ... press.htmlA full auto-tab example (that is somewhat more complex) can be found here.
http://javascript.internet.com/forms/auto-tab.htmlIf you're unsure how to include custom javascripts into your application, see
http://xataface.com/documentation/how-t ... avascriptsAnother note, about the find utility --
I have a variable set as enum('0', '.1', '.2', '.3', '.4', '.5', '.6', '.7', '.8', '.9', '1').
If I do a find on this field for 1, I get '.1' and '1'. I want just '1'. I can go around it by just writing out the url (i.e. myfield==1) and putting a link in my forms, no biggie.
The reason for this is dataface by default matches any record containing the query in text/varchar fields (which an enum field is implicitly). It does exact matching on numeric and date columns. if you want to force an exact match, just precede the query parameter with an '='.
e.g.
search for '=1' instead of just '1'.
Best regards
Steve