genericForm not behaving

Hi,

I have written a fairly simple form. I have two fields using numeric input types. However it doesn’t display the way I would like it to. I can’t move the cursor into either of the fields. Which means I can’t enter anything. Also all of eh soft keys with the exception of the “back”, soft key are blank. What am I doing wrong. Any suggestions would be greatly appreciated.

[code]var app = require(‘app’);
app.init();

var genericForm = require(‘genericForm’);
//The array of input items to use in the form
var form_items = [
{
‘text’ : ‘Extension number’,
‘setting’ : ‘extension’,
‘inputType’ : ‘numeric’, //
‘validate’ : ‘[0-9]+[0-9]+[0-9]’,
‘errorMsg’ : ‘Must be 3 digits in length’,
‘inputParams’ : {}
},
{
‘text’ : ‘Password’,
‘setting’ : ‘password’,
‘inputType’ : ‘numeric’, //
‘validate’ : ‘[0-9]+’, //require at least one letter followed by at least one digit
’errorMsg’ : ‘Must contain digits’,
‘inputParams’ : {}
}
];

genericForm.show({
‘id’ : ‘exampleForm’,
‘labelWidth’ : (digium.phoneModel === ‘D70’) ? 140 : 125,
‘values’ : {
‘extension’ : ‘123’,
‘password’ : ‘’
},
‘inputs’ : form_items,
‘object’ : this,
‘title’ : ‘Extension Login’,
‘onkeyline1’ : digium.background,
‘onkeycancel’ : digium.background,
‘forceRedraw’ : true
});
[/code]

Hi intellectit,

I ran your example and noticed what you reported and then also noticed that the behavior returned to what I would have expected after calling show in the context of the digium.app.foreground event. That said, I do not know why changing the context of the call to genericForm.show() changed the behavior. But at least hopefully you aren’t blocked anymore.

I created a basic genericFormExample at github.com/digium/digium-phone-apps which I hope will help.

Cheers,
Shaun

You are a champ Shaun. That works perfectly.