1

所以我发生了一些复杂的生成表单,它在我的 Windows xampp 服务器上运行良好,但是在我的 linux 生产服务器上提交后,下拉字段值没有被检索到 - 有什么想法吗?

    $f=$block->add('Form');

    if($dropdown) {
        $f->addField('Dropdown',$dropdown['value'],$dropdown['label'])
            ->setModel($dropdown['model']);

    }

    // Button
    $b=$f->add('Button')->setLabel($label);

    if($dropdown) {
        $b->js('click', $f->js()->atk4_form('submitForm'));
    }
    else {
        $b->js('click')->univ()
            ->newWindow($this->api->getDestinationURL(
                                './details',
                                array('model'=>$model,'type'=>$type)
                                )
                        )
                        ->execute();    
    }

    $block->add('HR');


if($f->isSubmitted()){
    $f->js()->univ()
            ->newWindow($this->api->getDestinationURL(
                                './details',
                                array(
                                        'model'=>$model,
                                        'type'=>$type,
                                        'field'=>'home_'.$dayShort,
                                        'value'=>$f->get($dropdown['value'])
                                        )
                                )
                        )
                        ->execute();    

    }

}

在 Windows 中有效但在 linux 中无效的部分已'value'=>$f->get($dropdown['value'])接近尾声

任何帮助将不胜感激!

谢谢格雷格

4

1 回答 1

1

When whatever thing works in Windows and don't work in Linux first thing to check out is upper / lower case letters in classnames and filenames.

In this particular case I guess your mistake is because you have addField('Dropdown'), but should have addField('DropDown') with uppercase D in "down".

于 2013-01-09T11:48:02.210 回答