How do I link to a subpage after creating a record?

I would like my users to create a new project just by entering in the project name and institution. Upon submission (creation of new record) I then would like them to go to edit that same record, where user can input additional info into optional fields. I already have a Project Details page with an Edit Project subpage, but I can't figure out how to get my Add submission to redirect to the Edit Project page.

An another topic, I am also interested in a subpage redirecting to the previous page upon submission, if anyone has any insight into this.

If I understand this correctly, it's just a matter of having the first add record page direct to a 'new child page' (in the Submit rules) editing the same type of record:

You could then set child page to open as a pop up with a submit rule to return to parent.

You'll want to investigate using JavaScript..

var emp_pay_period_submit_view = 'view_67';

$(document).on('knack-record-create.' + emp_pay_period_submit_view, function(event, view, record) {
//alert("Adding Employee Pay Period");
//console.log(record);

});

The above will trigger after the new record has been added in that view.. So, get the record.id value from the record data, and redirect your user to the edit view with the correct record id.

Julian

1 Like