check value from text area - Page 1 -...

User 2831767 Photo


Registered User
24 posts

hello! i need to check the value of text area.
example: if ( [mytext] is "12345" ) then ok

thanks
User 2831767 Photo


Registered User
24 posts

if ( [mytext] is "12345" ) then submit button is displayed
User 187934 Photo


Senior Advisor
20,271 posts

Hi tiziana,
Can you share a link to your form. I'm sure I can help you but I want to make sure were thinking the same thing.
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 2831767 Photo


Registered User
24 posts

excuse me for my poor english. my form is not published but in local. My problem is thath:
submit button visible only if in a textarea the test contain the "12345" value. You can help me?
User 187934 Photo


Senior Advisor
20,271 posts

Paste this to a html element on your form.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script>var jQ = $.noConflict(true);
jQ( document ).ready(function() {
jQ('textarea[name="textarea1"]').change(function() {
if(jQ(this).val() == "1234"){
jQ('#fb-submit-button').hide();
}else{jQ('#fb-submit-button').show();}
});
});</script>

Adjust the textarea1 to the name of your textarea.
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 2831767 Photo


Registered User
24 posts

you'are great ... very thanks! excuse me but i verified that the function correctly are :

when press submit button if textare not is "12345" the submit button not execute nothing and will be appear a message box.

you help me? you are very gentleman THANKS!!!!!!!!
User 187934 Photo


Senior Advisor
20,271 posts

Your changing the rules.:lol:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script>
var jQ = $.noConflict(true);
jQ( document ).ready(function() {
jQ(':submit').click(function(e) {
var txtarea = jQ('textarea[name="textarea1"]').val();
if(txtarea !== "12345"){
e.preventDefault();
alert("Please enter 12345");
}
});
});</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 2831767 Photo


Registered User
24 posts

thanks... very very good.
User 2831767 Photo


Registered User
24 posts

uhm...its very simply to hack!!!! from database? its possible? Eric i'm sorry
User 187934 Photo


Senior Advisor
20,271 posts

tiziana salvagio wrote:
uhm...its very simply to hack!!!! from database? its possible? Eric i'm sorry

I'm not sure what your asking.
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

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.