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) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Client-Side Validation
Pages: [1]

Author Topic: Client-Side Validation  (Read 1192 times)

pnad

  • Guest
Client-Side Validation
June 30, 2008, 11:06:34 am
Hello,

I created a custom profile with some custom fields to collect hotel check-in and check-out information for a new event. How do I validate that the check-in and check-out dates are between the dates of the actual event. For example: the dates of the actual event are July 7-8, 2008 and so the hotel check-in and check-out dates have to be around those dates (maybe plus or minus one day).


lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: Client-Side Validation
June 30, 2008, 11:16:51 am
Currently not possible without hacking. You can control the year-range through the custom field settings, but not a specific date range window.

If the possible dates for check-in/check-out are finite, you could allow the selection of a date from a drop-down/select list. That would probably be easier for the end user as well.
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Client-Side Validation
June 30, 2008, 12:05:45 pm

You can implement the validate hook to do custom validation. More details on the hook specs can be found here:

http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+hook+specification

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Client-Side Validation

This forum was archived on 2017-11-26.