On a user registration form with additional field added by content profile, if there were validations errors that caused the form to be repainted, the spamicide field was showing to the user. This seemed to be triggered by the inclusion of some ahah fields, such as the submit button on a CCK filefield, that enable form caching. Removing these fields avoided the issue.

This is what I think is happening. If a form is cached, the hook_form_alter function is not called so in the case of spamicide, this means that the css is not added to hide the spamicide field. If the drupal_add_cdd is moved to a pre-render function, is gets added in all circumstances.

A patch is attached that does the job for me. If anyone with more experience in this module or in forms handling has any suggestions about the approach, I'd be happy to have another go.

CommentFileSizeAuthor
spamicide-prerender-css-01.patch1.33 KBstevehuk

Comments

lipcpro’s picture

Version: 6.x-1.10 » 6.x-1.x-dev
Assigned: Unassigned » lipcpro
Status: Active » Needs review

I've applied the patch to the dev branch, and marked this for review. If people mark this rbtc, I'll set a new stable release.

stevehuk’s picture

Status: Needs review » Reviewed & tested by the community

Downloaded and installed the updated package. This works for me. Thanks.

lipcpro’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Closed (fixed)