This topic is locked

Set value of field before submission

2/8/2010 11:51:47 AM
PHPRunner General questions
J
joeedel author

Hello,

Searched but couldn't find; How can I set the value of a field depending on which button is clicked on the submit form? If the user clicks a submit button "Submit for next step" I would like the value of phase to be set to "2" then have the record saved.

J
joeedel author 2/8/2010

Hello,

No answers so maybe I should clarify; When the user clicks the submit button I would like to update the value of a hidden field on the same form. I can't seem to find it, I would assume the answer is here in the forums can't seem to find it. I would assume that something like this would work but it doesn't

// if submit box is checked set the value of the phase field to 2
if ($values['submit_for_assignment']=="1")

{

$values['phase']="2";

}

else

{
}


Thanks,

Joe

J
Jane 2/15/2010

Hi,
use Before record added event on the Eventstab to check button and update field if needed.