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 CiviEvent (Moderator: Yashodha Chaku) »
  • I want validation for event title
Pages: [1]

Author Topic: I want validation for event title  (Read 747 times)

prachi.tamrakar

  • Guest
I want validation for event title
July 02, 2009, 10:55:40 pm
Hi,

I want to validate event title in civievent when i am creating new event .
I have written a code and it working but when i am going to update or edit that particular event it also check event title and display error message.

Its urgent


Thanks

Kiran Jagtap

  • Ask me questions
  • ****
  • Posts: 533
  • Karma: 51
Re: I want validation for event title
July 02, 2009, 11:06:26 pm
for consistency validation rules are always applied for add as well as update mode.
( case - if user change title and you bypass validations than this will create inconsistency. )

though there are two ways to bypass validations
1.  add rule only when action is add
2.  bypass rule when there is event id present ( since in add there is no event id and in update u have event id. )

hope this help

kiran 
You Are Designed To Choose... Defined By Choice.

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: I want validation for event title
July 03, 2009, 07:31:53 am
Quote
I want to validate event title in civievent when i am creating new event .
I have written a code and it working but when i am going to update or edit that particular event it also check event title and display error message.

You should use validate hook for this. check http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+hook+specification

Kurund
Found this reply helpful? Support CiviCRM

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • I want validation for event title

This forum was archived on 2017-11-26.