Data in form are preserved in case of failed listing publish.
Once listing is published, session should be cleared by osclass.
// KEEP VALUES OF INPUTS ON RELOAD
function careerjob_post_preserve() {
$post = Params::getParamsAsArray();
foreach($post as $n => $v) {
Session::newInstance()->_setForm($n, $v);
Session::newInstance()->_keepForm($n);
}
}
osc_add_hook('pre_item_post', 'careerjob_post_preserve');
// DROP VALUES OF INPUTS ON SUCCESSFUL PUBLISH
function careerjob_post_drop() {
Session::newInstance()->_clearVariables();
}
osc_add_hook('posted_item', 'careerjob_post_drop');
You can remove this line in functions.php to not keep these data in session:
osc_add_hook('pre_item_post', 'careerjob_post_preserve');