However, I would start by creating a recaptcha plasmature element
rather than using the box class. The box class is really ill-defined
for this sort of thing, and doesn't have good ways to access data.
Plasmature elements, however, have built-in error checking -- so the
element could (theoretically) just check whether the supplied answer
is correct and set a Disco error if it is not. Then a new form would
be displayed to the user (with a new recaptcha).
If things are done this way I don't think there should be any problems
with the submit button. It's possible that the other problem you are
seeing would be easier to resolve with plasmature too.
But these are just preliminary thoughts. Feel free to ask for help
with creating a plasmature element (all the native Disco ones are in
disco/plasmature/; there are also Reason-specific ones in
reason_4.0/lib/core/classes/plasmature/ .
Matt
> --
> You received this message because you are subscribed to the Google Groups "Reason Discussion" group.
> To post to this group, send email to reason-d...@googlegroups.com.
> To unsubscribe from this group, send email to reason-discuss...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/reason-discussion?hl=en.
>
To add the element to Disco, make sure you've included the file that
contains the new plasmature element, then in in your form view, add it
to on_every_time(), e.g:
function on_every_time()
{
$this->add_element('are_you_human','recaptcha');
}
The 1st parameter is the name of the element in this disco form --
it's the handle you can use later when you want to reference it.
The 2nd parameter is the plasmature type you want to use. In this
example I'm assuming you named your plasmature element class
"recaptchaType"; plasmature element types are referred to in Disco by
the name of the class minus the "Type" on the end.
You can then treat it like any other element of the form -- move it
around, etc. by referring to the element's name.
Matt