Coldfusion Code to disable a button

<cfparam name="form.h1" default="0">
<cfif isdefined('form.h1') AND form.h1 EQ 1>
    <cfoutput>The button is disabled when you submitted the form</cfoutput>
</cfif>
<cfform onsubmit="document.getElementById('s1').disabled = 1;" action="#cgi.SCRIPT_NAME#?#cgi.QUERY_STRING#">
    <cfinput type="text" name="t1" id="t1"><br>
    <cfinput type="text" name="t2" id="t2">
    <cfinput type="hidden" name="h1" id="h1" value="1">
    <cfinput type="submit" name="s1" id="s1" value="submit">
</cfform>

Comments

Popular posts from this blog

how to add new line in google form questions | Fix for next line issue in google form questions

How to add new line in dropdown type question in google forms