Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

cfinput required

Contributor ,
Mar 09, 2010 Mar 09, 2010

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

1.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Mar 11, 2010 Mar 11, 2010

That's symptomatic of not having a /CFIDE mapping on your web server.

--

Adam

Translate
LEGEND ,
Mar 09, 2010 Mar 09, 2010

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 09, 2010 Mar 09, 2010

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>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 09, 2010 Mar 09, 2010

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 10, 2010 Mar 10, 2010

Yes, getting error while submitting from

_CF_hasValue is undefined
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 11, 2010 Mar 11, 2010
LATEST

That's symptomatic of not having a /CFIDE mapping on your web server.

--

Adam

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources