For example,
if we create a master page named BED
while creating a new record for the master we create it using the create bed link in the right side(which has the controller URL bed/create).
But after that entering all the fields, and clicking the save button(in _form).
We have not mentioned any controller url in the save button but how it manages to locate the bed/create
In the same way while updating if we click the link for update, it locates the update action with the id, but while saving the page again how it manages to locate the bed/create again.
By default action of form is the same url (if you create action at ‘/index.php?r=bed/create’ action of form is set
action="/index.php?r=bed/create"). But if you need to change it – just add it to attributes of ActiveForm. For example for bed/update view: