I'm trying to use form_set_value in my validation function, but it's not working.

What I'm trying to achieve is this:

My validation function in a multistep form discovers a probable error. When it discovers this, I want to make visible a checkbox to give the user the chance to ignore the error if he's not worried about it. I do this in the form with some code along the lines of:

function example_form($form_values=null){
...
    $form["overridevisible"]=array("#type"=>"hidden","#value"=>$form_values["overridevisible"]);
    $form["override"]=array(
      "#type"=>"checkbox",
      "#title"=>t("You have an error. Check this box if you don't give a stuff"),
      "#default_value"=>$form_values["override"],
    );
    if(0==$form_values["overridevisible"]){
      // If there's no validation problem, no need to show the override checkbox
      $form["override"]["#prefix"]="<div style='display:none'>";
      $form["override"]["#suffix"]="</div>";
    }
...
}

and in the validation function, as taken from the VanDyk "Pro Drupal Development" book:

function example_form_validate($form_id,$form_values,$form){
...
      form_set_error("somefield","Something's wrong");
      form_set_value($form["overridevisible"],1);
...
}

Trouble is, this has no effect whatsoever. I have a nasty feeling that form_set_value() will only send the information to the form submit function, and won't send it to the form data that's being posted back to the user's browser.

I've read several forum trails about form_set_value() but I haven't been able to figure a way of applying them to this particular problem. Any ideas for other ways of getting the result?

Thanks, all help appreciated

David