captcha verification in popup before submission

marklandry 23 Aug, 2012
Is there a way to have the captcha/verification element show in a popup when submit is clicked?
I've been looking around for awhile but haven't found anything.
GreyHead 23 Aug, 2012
Hi Mark,

I've never seen it done. It might be possible if you have it in a hidden div and copy the div to a modal window. The problem will be keeping the integrity with the saved validation code.

marklandry 23 Aug, 2012
It would be just as good if I could hide the div until submit is clicked.
Easy to do with JQuery, but how could I make the element visible on submit only? Is there some kind of event I can call?
I guess I could cheat it and create a button that reveals the captcha AND submit elements...
marklandry 23 Aug, 2012
So I totally went the lazy route... - bottom of the page, click send...

In "load js" event "on load" before "show html":

window.addEvent('domready', function() {
    $('hidethis').setStyle('display', 'none');
    $('continue').addEvent('click',function() {
         $('hidethis').setStyle('display', 'block');  
         $('continue').setStyle('display', 'none');
    $('email').addEvent('focus',function() {
         $('email').value = '';  
    $('name').addEvent('focus',function() {
         $('name').value = '';  
    $('phone').addEvent('focus',function() {
         $('phone').value = '';  
    $('message').addEvent('focus',function() {
         $('message').value = '';  

Is there a better way to compile/minimize the above js? Noob question I know...
GreyHead 24 Aug, 2012
Hi Mark,

I have a PlaceHolder labels doc you can buy that has code for doing this in CFv4 - it also replaces the label if the input is left empty and removes it on submit before the validation checks.

This topic is locked and no more replies can be posted.