Ask a Question related to Coldfusion - Getting Started, Design and Development.
-
snark66 #1
required field vs disabled submit button.in a form
I'm trying to make my email field required. Have seen and tried multiple
solutions from this forum, with no success. I think it has something to do
with the line of code <input type="button" value="Continue"
onclick="page1.submit();"> I used to disable the enter button from submiting
the form. Is this somehow incompaible wih the required="yes" command?
I have had some limited success with the onBlur validate command that DWeaver
uses to insert some simple javascript, but it doesn't seem to work in all
cases.
Thanks in advance. Love this forum.
snark66 Guest
-
Required Form Field Ext.
Are there any extensions available for forms built in Dreamweaver MX 2004 that require the form user to fill in all fields. I have one that kind of... -
submit button on a form
i am developing a new web page and i am creating a form which has 10 text fields aand i have set the action to mailto:eamil address but the form... -
Web Form Required Field
Not supported. For more form help see - http://www.publishermvps.com/Default.aspx?tabid=30 -- David Bartosik - MS MVP for Publisher help:... -
Form Submit Button
Should be a quickie but I just can't get it to work. I have a form where my users can submit their football picks, when they click submit I would... -
Form Field/ Form Submit Problems (probably an easy answer...)
Hey Everyone.. I have a form that has approximately 7 text fields and 1 checkbox. Generally when this form is submitted(to itself BTW) it works... -
Dan Bracuk #2
Re: required field vs disabled submit button.in a form
Is page1 the name of your page, or the name of your form?
The problem you have to overcome is that:
validateat defaults to onsubmit
you don't have a submit button.
If page1 is the not the name of your form, try putting in the name of your
form.
Dan Bracuk Guest
-
snark66 #3
Re: required field vs disabled submit button.in a form
That's kinda what I figured (since it had worked on forms when I had a submit
button). Form1 is the name of my form. Any other suggestions? The onBlur
behavior that DWeaver wrote is nice, but seems insufficient to ensure the form
has a email.
snark66 Guest
-
Dan Bracuk #4
Re: required field vs disabled submit button.in a form
look up qforms and see if that meets your needs.
Dan Bracuk Guest
-
snark66 #5
Re: required field vs disabled submit button.in a form
I looked up qforms and fear it is still a tad over my head (though I'm learning
quickly). Any other suggestions?
I mistyped earler - page1 is the name of my form, which I am referencing with
<input type="button" value="Continue" onclick="page1.submit();">
Could I change the button back to a submit button, add the required="yes" as
an onblur event, and keep the enter button from submitting some other way? I
don't want to disable it, just keep it from submitting.
I apologize for my lack of javascipt expertise.
snark66 Guest
-
Dan Bracuk #6
Re: required field vs disabled submit button.in a form
What you want to accomplish requires javascript so, you'll either get good at
it or you won't accomplish your goal.
Try writing a javascript function that returns true if all the fields you want
to have values have values, and false if they don't. Then, on your button,
make your onclick attribute resemble
onclick="if(return function()==true) this.form.submit();)"
only with proper syntax.
Dan Bracuk Guest
-
reenaroy #7
Re: required field vs disabled submit button.in a form
<script language=javascript>
var submitAction="1";
function submitByJavascript()
{
if(document.form1.email.value=="")
{
submitAction="0";
}
if(submitAction=="1")
{
document.form1.submit();
}
}
</script>
<form name=form1 action="actionpage.cfm" method=post>
Email: <input type=text name="email"> <br>
<input type=button name=butt value=submit onclick="submitByJavascript();">
</form>
reenaroy Guest



Reply With Quote

