This topic is locked

Verify CheckBox BEFORE RECORD UPDATE !!

4/15/2009 4:41:40 AM
PHPRunner General questions
S
scarpy71 author

Hi!

I'm trying to customize the "BEFORE RECORD UPDATED" event (function BeforeEdit)

of on Edit Page to work this way:
if a checkbox in my Edit Page is "checked" <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=11559&image=1&table=forumtopics' class='bbc_emoticon' alt=':unsure:' />

{

  1. send an e-mail <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=11559&image=2&table=forumtopics' class='bbc_emoticon' alt=':D' />
  2. modify some value in the edit page <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=11559&image=3&table=forumtopics' class='bbc_emoticon' alt=':unsure:' />
  3. update the record with the new values. <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=11559&image=4&table=forumtopics' class='bbc_emoticon' alt=':unsure:' />
    } else {
  4. update the record with current values in the Edit PAge. <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=11559&image=5&table=forumtopics' class='bbc_emoticon' alt=':unsure:' />
    }
    I'm not sure how to write the if expression and points 2,3 and 4.
    Thanks a lot for your help!!!

    Scarpy
    <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=11559&image=6&table=forumtopics' class='bbc_emoticon' alt=':unsure:' />

J
Jane 4/16/2009

Hi,
here is a sample:

if ($values["FieldName"])

{

//checkbox is checked

//send email here

$values["FieldName2"] = "another value";

$values["FieldName3"] = "another value 3";

}



Also check Send email with new dataaction on the Events tab.