When the form type of "Form" is used for the Forward module, emails do not send, and nothing appears in the Forward Tracking log. When I switch back to "Link", the emails send, and the Forward Tracking page shows the posts I've forwarded.

Comments

dmetzcher’s picture

As FYI, the thank you message does not appear when the "Form" type is used. It does appear when the "Link" type is used (and the emails are sent and tracked as well when "Link" is used).

This is the default thank you message that appears at the top of the page when a forwarded post is sent by a user: "Thank you for your help in spreading the word about [Site Name]. We appreciate your help."

I didn't notice that it wasn't appearing at first, until I switched from "Form" to "Link", since I was trying to use "Form" the first time I used the module. When the email didn't send, I switched to "Link", noticed the thank you message, received the test email (sent to my own Gmail account), and saw it was tracked by the Forward module.

Thanks again!

berenddeboer’s picture

The reason is that the inline form submits to the node itself instead of to the /forward/nodeid url.

berenddeboer’s picture

Ok, disregard that last thing. Dugged in the form module and here's what you have to add:

function forward_nodeapi_formbody_validate($form_id, &$form) {
forward_form_validate($form_id, $form);
}
function forward_nodeapi_formbody_submit($form_id, $edit) {
forward_form_submit($form_id, $edit);
}

With these lines, submission and validation seems to work.

dmetzcher’s picture

Was that code snippet for me or the developer of the module?
If for me, do you know where I can add these lines (I don't want to mess anything up and create more problems for myself). If you can provide line numbers where I can add the code, or a snippet that I can do a search for, I can drop in the code.

Thanks for your help! :-)

seanr’s picture

That would be for me. I'm going to test it right now.

seanr’s picture

Component: User interface » Code
Status: Active » Fixed

OK, the bug is fixed now, but I did it differently tan above, opting to remove the duplicate form code and combine both forms into a single function. Let me know if you have any problems with it.

dmetzcher’s picture

Looks like the emails send now when using the "Form" type. Looks like the forwarded items are being tracked in the log.

Thanks!

Anonymous’s picture

Status: Fixed » Closed (fixed)