3 Replies Latest reply: Jul 6, 2010 12:43 PM by MurraySummers RSS

    Making a field required on a form

    BearHNC Community Member

      Hello,

      I have a form where I want to make the email required, I have set the code written as this:

      <input type="text" name="email" id="email" field="required" />

      I think that should work, but testing this form is complicated, so I was wondering if somebody could give me a yeah or neigh on weather this would work. I used the validated spry widgets which I thought that was there purpose, but that is not happening. If I do have this wrong can somebody tell me the right way.

      Thanks in advance.

        • 1. Re: Making a field required on a form
          MurraySummers CommunityMVP

          <input type="text" name="email" id="email" field="required" />

          I think that should work, but testing this form is complicated, so I was wondering if somebody could give me a yeah or neigh on weather this would work.

           

          Neigh.

           

          You will have to do the "required" thing by editing the Spry region.  I assume you have applied a Spry text field validation to this field?  Then click in the field, and you will see the cyan SPRY region appear on Design view.  Click on that tab, and you will get the Spry Property inspector.  That's where you can make a field be required.

           

          An HTML input field does not have a "field" attribute as you have attempted here.

          • 2. Re: Making a field required on a form
            BearHNC Community Member

            It turns out I killed the spry, this form communicates with our company's sales force site and inorder to do that the code I put in there seems to have elimanited the spry and now it is a regular form, so do you have any other ideas?

            • 3. Re: Making a field required on a form
              MurraySummers CommunityMVP

              Post a link to the page  so we can see the code.  The good news is that your modified code CANNOT "kill the spry", which can only be done by actually DELETING it from the page.