Captcha and Submit button - Page 1 -...

User 2056177 Photo


Registered User
232 posts

Is there any way to configure the submit button so that it only appears from a correct regular expression field?
Pete
User 187934 Photo


Senior Advisor
20,265 posts
Online Now

Hi Peter,
Setup your regex and test.
It shouldn't submit if the reg expression is wrong.
Several users have been using it as a simple captcha.

http://www.coffeecup.com/help/articles/ … s-captcha/
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2056177 Photo


Registered User
232 posts

Thanks Eric.
I have been using the reg expression for some time but what I would like to do is have the submit button appear after the full correct captcha field is filled out. The only way I can get this to work is by pressing the Enter key after completing the captcha. I was hoping that there was a way that the submit button only appears when the captcha is completed.
Pete
User 187934 Photo


Senior Advisor
20,265 posts
Online Now

Yes you can do that by setting a Conditional.
Select the submit button. Then on the properties tab scroll down to Show Element.
Now go through the settings.
Show Element = Using Display Rule
If Choose Element = Chose your Regex.
Choose Operator = Choose "Is not"
Choose value = Empty
Click on "Insert"
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2056177 Photo


Registered User
232 posts

Thanks Eric for the info but that is doing exactly what I have been able to do already.
If the Regex is set in that way, the submit button becomes visible after putting anything into the Regex field and pressing Enter. You only need to put one letter or number into the field.
I would like to have the submit button hidden and only becoming visible after the "correct code" is typed into the Regex field.
Pete
User 187934 Photo


Senior Advisor
20,265 posts
Online Now

OK, I can help you with that.
See if this works for ya.
Paste this code into a html element. Change the regex1 to match your regex input name
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <script type="text/javascript">var jQ = $.noConflict(true);
jQ(document).ready(function(){
jQ("input[name='regex1']").blur(function(){
if (jQ("input[name='regex1']").hasClass('error') ) {
jQ('#fb-submit-button').hide();}else{
jQ('#fb-submit-button').show('slow');
}
});
});</script>
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2056177 Photo


Registered User
232 posts

Hi Eric,
Thanks for the code info but it doesn't work.
Unfortunately, no matter how I try to set it up, you only need to put in one letter or number into the captcha and the submit button appears.
Unless I can get it to work in the next few days, I will give it up and leave the forms the way they are at present.
Pete
User 2056177 Photo


Registered User
232 posts

Add on to the above post ..... one letter or a number and then press enter shows the Submit button.
Pete.
User 187934 Photo


Senior Advisor
20,265 posts
Online Now

Give this one a try.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <script type="text/javascript">var jQ = $.noConflict(true);
jQ(document).ready(function(){
jQ("input[name='regex1']").blur(function(){

if (jQ(this).val().match(/[^0-9]/g, '')) {

jQ('#fb-submit-button').hide();}else{
jQ('#fb-submit-button').show('slow');
}
});
});</script>
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2056177 Photo


Registered User
232 posts

Hi Eric,
No go .... It does the same as the previous code. If you put in one letter, the submit button shows and by pressing enter, it would send the form.
At the moment its a test and all I have got on the form is a visible dropdown, a display rule regex, a display rule html field and a display rule submit button so it's not something that I can put up to show you.
Any more ideas would be most welcome.
Pete.

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.