views:

74

answers:

1

Despite many trials and errors, I cannot get the NumberTextBox widget to work. I keep receiving this error message:

Catchable fatal error: Argument 4 passed to Zend_Dojo_View_Helper_NumberTextBox::numberTextBox() must be an array, null given

The odd thing is: I event tried this example straight from the ZF examples page and it failed with the same error

            ->addElement(
            'NumberTextBox',
            'numberbox',
            array(
                'label' => 'NumberTextBox',
                'required'  => true,
                'invalidMessage' => 'Invalid elevation.',
                'constraints' => array(
                    'min' => -20000,
                    'max' => 20000,
                    'places' => 0,
                )
            )
        )

So, I'm at a loss now. If someone has the time to look at the code found here, your help would be greatly appreciated. I know it's something that I'm overlooking. It always is.

A: 

Shot in the dark: try getting rid of the ',' at the end of 'places' => 0,'

GoinOff