I've changed the way to output inline css style.
Now #markup key used to add it inline instead of drupal_add_css function.

Comments

Sergei Churilo’s picture

sgdavis’s picture

This seems like a great idea. I am having this problem as well (where the captcha is hidden when the page loads, but as soon as my form makes an AJAX call, it appears). Partly I think this is due to the way I implemented my AJAX callback (not quite the drupal way) but still I feel like this is a great idea to ensure the captcha never appears (as long as the visitor has CSS enabled of course).

weynhamz’s picture

Issue summary: View changes

I have applied issue #1, it worked as expected, thanks.

ApacheEx’s picture

+1, #1 works for me as well.

liam morland’s picture

Does this put the style element in the body of the page? HTML requires that style elements be in the head element.

liam morland’s picture

Status: Active » Needs work

I think drupal_add_css() should be used for adding CSS.

Why not use #prefix and #suffix instead of manually adding the 'div'?

If the constantly-changing class is a problem, perhaps it should stay the same for a session or otherwise be cached. Perhaps it could be stored in a variable and changed when the cache is cleared.

liam morland’s picture

Version: 7.x-1.0 » 7.x-1.x-dev
Anonymous’s picture

Patch is to old, any progress?

liam morland’s picture

This issue needs an explanation of what feature is being added.

liam morland’s picture

Status: Needs work » Closed (works as designed)

I don't understand what this is trying to accomplish. If there is still desire for this, please re-open and provide an explanation.