开发者

Symfony : loss of an URL parameter between executeNew / executeCreate

开发者 https://www.devze.com 2023-01-26 05:10 出处:网络
I\'m implementing concrete inheritance in my model. So I\'m trying to do (i\'m taking example upon jobeet) :

I'm implementing concrete inheritance in my model. So I'm trying to do (i'm taking example upon jobeet) :

When a user try to post his CV, he'll be redirected on a page on which he will be choosing his main skill (Developper / Network). Both of dev/network inherits from future_employees, cause it has common informations in it.

If he he chooses developper, the form displayed contained additionnal information + common information thanks to the concrete inheritance => it works great

But as soon as the create action is called, it looses the parameter 'category' and redirects me to a futureEmployeeForm form full of error (missing required para开发者_Python百科meters), which is logic, because i did not fill a futureEmployeeForm but a developperForm

What's going on ? How to preserve the parameter so that error can be fixed ? Or maybe i'm not using a good method to resolve this inheritance case ?

Thanks


What does the form look like? I.e., how is the category parameter being passed to the create action? My guess is that it's not in $request->getParameter('category') but rather in $request->getPostParameter('developperForm[category]').

0

精彩评论

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