Copy link to clipboard
Copied
Hi All,
I have a form using cfinput requred="yes" but the validation is not working in CF9. So i have submit the form with out filling data in mandatery fileds.
. Also i have noticed the same form working properly in CF8. Is it related with CF9. Please advice
That's symptomatic of not having a /CFIDE mapping on your web server.
--
Adam
Copy link to clipboard
Copied
Can you post some code that demonstrates what you're seeing? Is it one specific form, or is it with any <cfform> you create? Can you create a very simple <cfform> with appropriate <cfinput>, and do you still see the problem? Any JavaScript errors?
As a rule of thumb, if you're asking help with code... it's always good to actually post it, otherwise people can only guess as to what you're doing wrong.
--
Adam
Copy link to clipboard
Copied
index.cfm page
<table border="0" cellspacing="0" cellpadding="0">
<cfform method="post" action="test.cfm">
<tr>
<th>Firstname</th>
<td ><cfinput class="text-box" type="text" required="Yes" message="Please enter first name" name="name1" size="50" /></td>
</tr>
<tr>
<th>Surname</th>
<td ><cfinput class="text-box" type="text" required="Yes" message="Please enter second name" name="name2" size="50" /></td>
</tr>
<tr>
<td> </td>
<td colspan="2"><input type="image" src="images/click.gif" name="submit" value="Submit" /></td>
</tr>
</cfform>
</table>
Copy link to clipboard
Copied
I ran that code on CF9 and the requiredness worked exactly as I would expect.
As per previous email: are you getting any JS errors?
--
Adam
Copy link to clipboard
Copied
Yes, getting error while submitting from
_CF_hasValue is undefined
Copy link to clipboard
Copied
That's symptomatic of not having a /CFIDE mapping on your web server.
--
Adam