开发者

Symfony confirm message if a condition is true (submit_to_remote)

I made a radiobutton based form in Symfony. I'd like to make a confirm message, IF a radio button checked. This is 开发者_运维百科my code, but it's not exactly what I want:

            <?php echo jq_submit_to_remote('deleteButton','Törlés', array(
                'url' => 'editCategory/deleteSubmenu',
                'with'=>"'value=' + getSelectedRadio()",
                'condition' => 'getSelectedRadio() != undefined',
                'confirm' => 'Are you sure?',
            )) ?>

This makes the confirm message in every case. How can I add condition to the confirm?


You won't be able to do that with symfony's helpers, you'll need to write your own JS code. That's the recommended way to do it anyway - there's a reason the javascript helpers got deprecated.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜