I have a button that have an event (onClick) that calls a javascript. In this js have a load() function that load a div from another model (don’t this where is my button).
When the div of another model is loaded, I have a form that I fill and I click in a submit button (now is from the form of my div).
When I click in this submit button, I wanna that the model->save() be executed and stays on the same page, but the render() function of my controller redirects me to the create.php page.
How do this? How to keep in same page?
I wanna this:
5547
When I click in the label "Adicionar nova filiação", my other _form is called and shown, like in the Image.
But, when I press in OK button of this form (Filiacao), I need that the data be stored on the database (this is ok [actionCreate()]) and stay on this page.
That load the <div> of my Filiacao _form and when I click on the submit button of the Filiacao _form that load() function call, the page is redirected and I don’t wanna this.
In other words, what I need is save data from a model (Filiacao) that was loaded into a model (identificacaoEmigrante). IE, how to use $model->save() without render() / redirect to another page in controller?