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 Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Validate input on custom field - howto?
Pages: [1]

Author Topic: Validate input on custom field - howto?  (Read 2320 times)

BarisArt

  • Guest
Validate input on custom field - howto?
January 30, 2008, 05:08:42 am
Hi all,

I need to validate the user's input on a custom field. I am asking a users bankaccount number, and I would like to validate if this is a valid number before the user can subscribe to an event. This can easily be done using PHP.

Some other ways this could be useful:
- validate if the entered value is X characters long
- check if the user's age is older/younger than certain value

So I would like to validate the input after submitting - and give an error on a false input.


Is this possible? And if so, how?


Kind regards,

Baris Wanschers

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: Validate input on custom field - howto?
January 30, 2008, 06:31:31 am
http://forum.civicrm.org/index.php/topic,2164.msg9291.html#msg9291

kurund
Found this reply helpful? Support CiviCRM

speleo

  • Ask me questions
  • ****
  • Posts: 396
  • Karma: 28
  • CiviCRM version: 4.3.1
  • CMS version: J! 2.5,9
  • MySQL version: 5.1
  • PHP version: 5.3.24
Re: Validate input on custom field - howto?
January 31, 2008, 01:24:55 am
Storing bank account details opens you up to a whole load of security concerns. Are you sure you need this? If you are taking a payment shouldn't you just use a payment gateway?

BarisArt

  • Guest
Re: Validate input on custom field - howto?
January 31, 2008, 08:20:03 am
That is totally true. However, in the Netherlands, creditcards are hardly used.

People pay online by withdrawal allowance (I allow this organisation to withdraw the amount from my bankaccount xxx) or by iDEAL.
iDEAL is upcoming, almost 40% of online shopping is paid by iDEAL (iDEAL takes the user to his own online banking environment where the transfer to organisation xxx is already waiting, the user only has to press accept). It would be great if there was a Payment processor for iDEAL, but sadly there isn't (yet?).

I only want to save the bankaccount number - not the pincode to use it. We use the bankaccount numbers to make automatic monthly withdrawals, for which we need the clients signature. So therefor I:

- Need to get their bankaccount number using Custom Fields
- Need to use Pay Later without the need for a Payment Processor.

Strangly, if it is a Paid Event (which it is), CiviCRM doesn't allow me to use Pay Later without selecting a Payment Processor.
Well.... it does -> until I test-drive it (there is no check for this in the event configuration).

Any idea's how to solve this?


Kind regards,

Baris Wanschers


MacRonin

  • I post frequently
  • ***
  • Posts: 153
  • Karma: 14
Re: Validate input on custom field - howto?
January 31, 2008, 05:27:11 pm
Quote from: BarisArt on January 31, 2008, 08:20:03 am
Strangly, if it is a Paid Event (which it is), CiviCRM doesn't allow me to use Pay Later without selecting a Payment Processor.
Well.... it does -> until I test-drive it (there is no check for this in the event configuration).

I think the Dummy payment processor might be able to help here.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Validate input on custom field - howto?
February 01, 2008, 10:35:47 am
Also, this has been fixed for 2.0: http://issues.civicrm.org/jira/browse/CRM-2573
Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Validate input on custom field - howto?

This forum was archived on 2017-11-26.