Hello,

I am using the core poll module, but would like to add an additional functionality: background picture illustrating the subject of the poll.

For that purpose, I have create a module and added an new field ("background file name) through form_alter hook.

The information is stored in a new table (poll_background).The table has 2 fields: nid and file_name_background.

My problem is that at the moment of the submit, I cannot find a value for the nid. Looking with DSM, I get a NULL value for nid.

Any suggestion or advice on how to do it otherwise?

Thanks, Yoel

Comments

nevets’s picture

If you use hook_nodeapi(), $op equal "insert" and "update", the nid will be set at that point.

yoeld’s picture

Hi Steve,

Thanks for the advice. That has indeed solved my problem.

Yoel