I have a safecracker form where I need the user to create a new entry. When the form is submitted I want the return address to include the newly created entry id, but I can't figure out how via the documentation.
I have tried:
{exp:safecracker channel="submissions" return="submission-complete/ENTRY_ID" include_jquery="no" safecracker_head="no"}
And:
{exp:safecracker channel="submissions" return="submission-complete/{entry_id}" include_jquery="no" safecracker_head="no"}
Anyone know how to do this?
$('form#publishForm').ajaxForm({
dataType: 'json',
beforeSend: function() {
status.empty();
var percentVal = '0%';
bar.width(percentVal)
percent.html(percentVal);
},
uploadProgress: function(event, position, total, percentComplete) {
var percentVal = percentComplete + '%';
bar.width(percentVal)
percent.html(percentVal);
},
success: function(data) {
var percentVal = '100%';
bar.width(percentVal)
percent.html(percentVal);
window.location.href = "/submission-complete/"+data.entry_id;
}
});