Skip to main content
Inspiring
Mar 11, 2013 8:40 PM UTC
Question

Server Side Form Validation

Hello,

How can I make my form not submittable if the Javascript is disabled? The form uses CFFORM and

the validation page does the following: <cfif  name EQ "">Error<cfelse>Ok</cfif>.

How can I prevent the form from getting submitted if a user disables Javascript?

Thanks for your help!



This topic is closed to new replies. Start a new post to keep the conversation going.

2 replies

Participating Frequently
Mar 14, 2013 7:01 AM UTC

check this code i think it will help full for you

<script type="text/javascript">

    document.write("<input type=\"submit\" value=\"Submit Form\" />");

</script>

<noscript>

    <p style="color: red;"><b><i>Please enable JavaScript to continue</i></b><p>

</noscript>

Translate
Inspiring
Mar 11, 2013 10:58 PM UTC

Use javascript to display the submit button once the user has filled in the fields you want filled in,

Translate