2009/8/22 Hans Langouche <[email protected]>:
> Hi there,
>
> I'm working on a (node) profile system that has a checkbox to allow people
> to be informed by postal mail.  If checked the system sends a mail with the
> details to a certain email address.  Of course this email shouldn't be sent
> every time  the profile is updated, but only when the checkbox was
> previously unchecked (if it was checked allready, nothing should happen).
>
> For the moment I'm thinking of creating a second (hidden) value to which I
> compare on 'update' and sync with the actual value after the check.  But I'm
> thinking there must be an easier way, but can't find it in documentation or
> by inspecting $node on 'update'.

Wouldn't it suffice adding a table (uid, sent) so when user checked
the checkbox it will check for a record in that table for the current
user, if not there, it will send system email and add a record to that
table?

That way, you know if the checkbox was checked previously and can
decide to display it defaulting to checked, or just hide the checkbox.

Henrique

> Tnx,
>
> HnLn
>
>

Reply via email to