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) »
  • General Discussion (please no support requests here!) (Moderator: Michał Mach) »
  • how to validate custom field in contact form
Pages: [1]

Author Topic: how to validate custom field in contact form  (Read 453 times)

henro

  • I post occasionally
  • **
  • Posts: 115
  • Karma: -1
  • CiviCRM version: 4.5.0
  • CMS version: drupal
  • MySQL version: 4.2.7.1
  • PHP version: 5.2.0
how to validate custom field in contact form
December 03, 2014, 07:19:19 pm
hi all,
i ask again  :-\

i want to validate contact form, where the field i want to validate is by custom field,

i have readed this
http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_validateForm

its very help,
but the example field validated there is by " addres " field and as i know it is not a custom field .

this the warning i face

 
    Notice: Undefined index: custom_9 in myextension_civicrm_validateForm() (line 119 of C:\xampp\htdocs\drupal\extentions\com.example.myextension\myextension.php).
    Warning: Invalid argument supplied for foreach() in myextension_civicrm_validateForm() (line 119 of C:\xampp\htdocs\drupal\extentions\com.example.myextension\myextension.php).




could anyone give to me an example to validate form conctac by custom field

thanks in advance


« Last Edit: December 03, 2014, 08:05:27 pm by henro »

joanne

  • Administrator
  • Ask me questions
  • *****
  • Posts: 852
  • Karma: 83
  • CiviCRM version: 4.4.16
  • CMS version: Drupal 7
Re: how to validate custom field in contact form
December 03, 2014, 08:21:51 pm
 AS the board is called General Discussion (please no support requests here!)      this question does not belong here.

Probably the developer's board will would be a better place for it.


henro

  • I post occasionally
  • **
  • Posts: 115
  • Karma: -1
  • CiviCRM version: 4.5.0
  • CMS version: drupal
  • MySQL version: 4.2.7.1
  • PHP version: 5.2.0
Re: how to validate custom field in contact form
December 03, 2014, 08:31:15 pm
thanks for the info Joanne  :)

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • General Discussion (please no support requests here!) (Moderator: Michał Mach) »
  • how to validate custom field in contact form

This forum was archived on 2017-11-26.