After further testing, it seems this solution doesn't work as expected; The page redirects to the new URL before the form is fully submitted, so the data isn't saved.
Instead, I've added a radio button, which asks whether the user wants to submit the form or submit and redirect (which actually goes back to the same form):
$value = ff_getSubmit('add_cab');
switch( $value )
{
case 'yes': header("Location: https://mypage.com/index.php?option=com_breezingforms&view=form&Itemid=111&data_ref_id={$ref_id}&cab_number={$cab_number}"); exit;break;
}
Thanks,