Hi,
I made a form with a DISABLED CHECKED checkbox, because I detected that the user is not allowed to disagree with that option.
But whenever this form is submitted, it never submit the checkbox. What is this happenning?
If you want me to show the code, I will but I think it is that simple.
Please help me with this.
Submitting the unsubmittable
Moderator: General Moderators
-
method_man
- Forum Contributor
- Posts: 257
- Joined: Sat Mar 19, 2005 1:38 am
Re: Submitting the unsubmittable
Disabled elements are not submitted. Read-only are.harrison wrote:Hi,
But whenever this form is submitted, it never submit the checkbox. What is this happenning?
Hie,
You will have to apply javascript validation.
The form should be submitted only if the user agrees else the form should not get submitted.
You can try this :
Asmie
You will have to apply javascript validation.
The form should be submitted only if the user agrees else the form should not get submitted.
You can try this :
Code: Select all
<script>
function validate(obj)
{
if(obj.value == "e;agree"e;)
{
document.form1.btnSubmit.disabled = false;
}
else
{
document.form1.btnSubmit.disabled = true;
}
}
</script>
<form action="e;"e; method="e;post"e; name="e;form1"e;>
<p>
<input type="e;radio"e; name="e;myradio"e; value="e;agree"e; onClick="e;validate(this)"e;>
Agree
<input type="e;radio"e; name="e;myradio"e; value="e;disagree"e; onClick="e;validate(this)"e;>
Disagree
</p>
<p>
<input type="e;submit"e; name="e;btnSubmit"e; value="e;Submit"e; disabled>
</p>
</form>Asmie
If he isn't allowed to do it... he shouldn't rely on it, as he would eitherway have to check that value to make sure the user didn't "change the matrix"
.
So, disabled checkboxes not being sent is more of a feature if you ask me, as if it is disabled, YOU should know the answer to it, and he should not by any means be able to specify something else.
So, disabled checkboxes not being sent is more of a feature if you ask me, as if it is disabled, YOU should know the answer to it, and he should not by any means be able to specify something else.
Re: Submitting the unsubmittable
is the solution.Roja wrote:Disabled elements are not submitted. Read-only are.
Code: Select all
<input name="e;putmein"e; type="e;text"e; size="e;8"e; value="e;€ 699.-"e; readonly="e;readonly"e;>