用于Ajax Modal Form的kohana设置URL

时间:2023-01-22 18:55:25

I have a Kohana controller, and a route corresponding to it. also, i want to make a form that will appear as a ajax modal, when a user clicks a link. The problem is: i want this form to be controlled by a different controller action, and of course, because i am using exactly the same data as in the view using the first controller action, i will have exactly the same parameters (in the second controller action). The problem is that, having the same parameters and only different actions, my both controlers's routes will point in the same page. So...

我有一个Kohana控制器,以及与之对应的路线。此外,当用户点击链接时,我想创建一个将显示为ajax模式的表单。问题是:我希望这个表单由不同的控制器操作控制,当然,因为我使用与使用第一个控制器操作的视图中完全相同的数据,我将具有完全相同的参数(在第二个控制器动作)。问题是,具有相同的参数和只有不同的动作,我的两个控制者的路线将指向同一页面。所以...

How can i make an ajax modal form that will use exactly the same variables that the view in which i am putting the link to the modal form is using? is it indicated to make another controller action?

我怎样才能制作一个ajax模态形式,它将使用完全相同的变量,我将链接到模态形式的视图正在使用?是否表示要进行另一个控制器操作?

Thank you!

谢谢!

1 个解决方案

#1


0  

I guess you just should create 2 different views.

我想你应该创建2个不同的视图。

#1


0  

I guess you just should create 2 different views.

我想你应该创建2个不同的视图。