ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

How can I validate check boxes and a drop down box in a safecracker edit form

March 15, 2012 10:56pm

Subscribe [1]
  • #1 / Mar 15, 2012 10:56pm

    dliu

    18 posts

    Hi,

    I am using safecracker to build an edit form. How can I validate check boxes and a drop down box. For example the error message will be showed “please select at least one” if I do not check any boxes. Also if I do not choose any value from a drop down box, the message “Pleas choose an item from drop down box” should be shown when I submit the edit form. I only found safecracker can validate input box, such as phone number, address…. But I can not find any example or document about check box and drop down list.  Any example or suggestion?

    Thank for any help.

     

     

  • #2 / Mar 16, 2012 5:59pm

    Sean C. Smith

    3818 posts

    Hi dliu,

    Typically that kind of form validation would be done with javascript. One of the more popular scripts for this is jQuery Validation. Does that help? Is there anything else I can assist you with?

    Sean

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases