RA Jones wrote:

> which normally works fine, except in the above scenario where the
> dfv_error_page() has changed all instances of value="desired_runmode"
> into value="name of the current run-mode". So when we fill in the next
> section of the web-page and submit the data, the previous run_mode
> (which generated the dfv_error_page) gets called, no matter which
> sections' submit button is pressed. This means the new data submitted is
> lost as we don't go to the relevant run_mode to process it.
> 
> Presumably changing all rm's to the current rm is the intended behaviour
> of ValidateRM / HTML::FillInForm, but is there anything I can do to
> modify this so it works the way I desire, or is it not possible? Hope it
> all makes sense.

Well, HTML::FillInForm will fill in everything unless it's told not to. You can
pass extra args to it as a third argument to check_rm(). You can either tell it
to ignore fields named 'rm' or you can tell it which form you want to fill.

  $obj->check_rm('run_mode', '_validate_run_mode', {ignore_fields => ['rm']},)
    || return $obj->dfv_error_page();

or

  $obj->check_rm('run_mode', '_validate_run_mode', {target => 'form1' },)
    || return $obj->dfv_error_page();


-- 
Michael Peters
Developer
Plus Three, LP


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[email protected]/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to