From 94c305dd70838502a89949e1f9bb0bbb3505071b Mon Sep 17 00:00:00 2001 From: Karsten Heiken Date: Sat, 22 Oct 2011 21:18:31 +0200 Subject: [PATCH] Fix issue #2 that prevents copying of an experiment If the form validation fails, the form is not correctly populated with the values that are set for the application. --- application/views/experiments/new.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/application/views/experiments/new.php b/application/views/experiments/new.php index 397c5a5..9b3f0ba 100644 --- a/application/views/experiments/new.php +++ b/application/views/experiments/new.php @@ -104,11 +104,20 @@ - + input->post('param-' . $param['id']); + } else { + if(isset($copy_params) && isset($copy_params[$i]['value'])) { + $value = $copy_params[$i]['value']; + } else { + $value = $param['default_value']; + } + } ?> - +