nothing complex.. you need J-query and this populate pluggin: https://github.com/dtuite/jquery.populate
in your controller save action, save forms datas into session (before redirect):
$this->session->set('currentForm', $_POST);
in your volt file, add:
<script>
var formDatas = {};
</script>
{% if session.get('currentForm') !== null %}
<script>
formDatas = {{ session.get('currentForm')|json_encode }};
</script>
{% endif %}
<?php unset($_SESSION['currentForm']); ?> //not found how to do that with volt languages...
then in your js file:
if (formDatas !== undefined && formDatas !== "") {
$("#your-form").populate(formDatas, {resetForm:true});
}
that all folkz.. don't forget to remove password from $_POST if any, or they will be displayed clear in the htm source..