extract Input::get method to foreach on preview view