CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Contribute form validation...
Pages: [1]

Author Topic: Contribute form validation...  (Read 936 times)

jmkaep

  • I post occasionally
  • **
  • Posts: 41
  • Karma: 1
Contribute form validation...
December 06, 2010, 08:15:23 am
Is there some way of making the Contribution form validation stricter. Right now the name, address fields etc can be filled with one number without generating an error message.

For example:

First Name:
3
Middle Initial:
3
Last Name:
3
Address:
3
City:
3
Postal Code:
3

Michael McAndrew

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1274
  • Karma: 55
    • Third Sector Design
  • CiviCRM version: various
  • CMS version: Nearly always Drupal
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Contribute form validation...
December 06, 2010, 08:26:07 am
you can use the validation hook
http://wiki.civicrm.org/confluence/display/CRMDOC32/CiviCRM+hook+specification#CiviCRMhookspecification-hookcivicrmvalidate
Service providers: Grow your business, build your reputation and support CiviCRM. Become a partner today

jmkaep

  • I post occasionally
  • **
  • Posts: 41
  • Karma: 1
Re: Contribute form validation...
December 06, 2010, 09:50:47 am
Thanks for you reply.

Does that mean the validation is not done through the jquery javascript or am I totally on the wrong track here.




Michael McAndrew

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1274
  • Karma: 55
    • Third Sector Design
  • CiviCRM version: various
  • CMS version: Nearly always Drupal
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Contribute form validation...
December 06, 2010, 10:06:02 am
correct.  there are a few places where javascript is used (for example to test if a contact already exists based on first name, last name, etc.before adding one) but on the whole it is done on submission with a validate function

hence this hook that you can use for most if not all form submissions
Service providers: Grow your business, build your reputation and support CiviCRM. Become a partner today

jmkaep

  • I post occasionally
  • **
  • Posts: 41
  • Karma: 1
Re: Contribute form validation...
December 07, 2010, 05:21:14 am
OK thanks.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Contribute form validation...

This forum was archived on 2017-11-26.