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 »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • user login form.. cleanup and require fields
Pages: [1]

Author Topic: user login form.. cleanup and require fields  (Read 1077 times)

MBScott

  • I’m new here
  • *
  • Posts: 6
  • Karma: 0
user login form.. cleanup and require fields
March 01, 2009, 11:29:13 am
I'm using Drupal 6.9 and civicrm 2.2.1.

When a user fills in the login information for a new account, it automatically gets added to the civicrm contacts screen. Great.

Problem: If the user fills in the form like a lot of people and doesn't use any caps, then the address labels come out looking like a 3 year old wrote them.

How to force (and where?) something like ucwords() or ucfirst() so that the admin doesn't have to go through each record to format addresses when making labels.

Also, can I force it to make addresses (we use a lot of offline mailings) required?

Thanks!!

Missy


Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: user login form.. cleanup and require fields
March 01, 2009, 02:35:59 pm
You might be able to use the "validate" hook to ucfirst the address strings (if you want the user to fix them before saving) OR the "post" hook to fix them "automatically".

Caveat - not 100% sure how / if our hooks work in standalone installs - someone else can pipe in on this.

RE: required address fields - you should be able to go to the CiviCRM Profile which is used in the new account screen and set required field property (from Administer CiviCRM >> Customize - CiviCRM Profile
Protect your investment in CiviCRM by  becoming a Member!

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: user login form.. cleanup and require fields
March 01, 2009, 03:07:26 pm

standalone hooks are of the form:

standalone_civicrm_pre
standalone_civicrm_post
...

You will need to ensure that the file defining those function is loaded, so you will need to hack: standalone/index.php and require it there. We plan on rectifying this in a future release with a naming and loading protocol

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

MBScott

  • I’m new here
  • *
  • Posts: 6
  • Karma: 0
Re: user login form.. cleanup and require fields
March 01, 2009, 04:29:59 pm
Thank you, both.  I won't have a chance to look until tomorrow, when I will likely be back with more questions, but I appreciate it very much!

Missy

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • user login form.. cleanup and require fields

This forum was archived on 2017-11-26.