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) »
  • CiviCRM / Drupal User Registration Form Validation Issue
Pages: [1]

Author Topic: CiviCRM / Drupal User Registration Form Validation Issue  (Read 2235 times)

Oliver

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
CiviCRM / Drupal User Registration Form Validation Issue
November 25, 2009, 10:56:39 am
I'm experiencing bizarre behaviour with respect to the Drupal user registration form, namely when it comes to CiviCRM form/field validation... Let me explain:

I'm using CiviCRM Profile --

Profile Title: Name and Address.
Type: Contact, Individual
User For: Drupal User Registration, etc.

I've added one extra required field; "Postal Code."  I've removed the First and Last name requirements.

Upon first submit, leaving everything blank, it reports the Username, E-mail, and Postal Code field is required. Great, that's what I want.

Second submit, this is where things get a little weird... Leaving everything blank again, the same validation errors appear, but there's a new one  that now says, "Please correct the following errors in the form fields below: Postal Code is a required field."

Ok...

So now, third time, I enter a postal code, lets say I enter "test1" for the sake of this example, and I leave the rest blank.  Click submit and again, Username + E-mail must be entered, etc.  However, "test1" is not re-populated in the Postal Code field.

Now, the fourth time, this is where things get even more weirder... I enter "test2" into the Postal Code field, leaving Username and E-mail blank again, and the page reloads with the validation errors; however, now the Postal Code field is populated with "test1" from the 3rd attempt.

The form always seems "one submit" behind.  If I do it again for the 5th time, say "test3" now, then "test2" from the 4th attempt is populated in the Postal Code field.

Case in point: http://preview.web.net/example/user/register
htaccess user/pass is: example/example

Steps to reproduce the issue:

1. Leave everything blank; hit submit.
-- Result: Correct validation errors.

2. Enter "test1" into the Postal Code field; hit submit.
-- Result: A new validation error appears and Postal Code is not re-populated with the submitted value.

3. Enter "test2" into the Postal Code field; hit submit.
-- Result: "test1" from step 2 is now populated in the Postal Code field.

4. Enter "test3" into the Postal Code field; hit submit.
-- Result: "test2" from step 3 is now populated.

Lather, rinse, repeat.  Is this just me or does something not seem right here?

Thanks in advance.
« Last Edit: November 25, 2009, 10:58:17 am by ozielke »

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: CiviCRM / Drupal User Registration Form Validation Issue
November 25, 2009, 01:57:35 pm
Thanks for reporting this. Not sure what's going on in the session - but basically the form values returned "alternate" for each submit as you've indicated (recreated on 3.0 demo and 3.1 sandbox). Issue filed here:

http://issues.civicrm.org/jira/browse/CRM-5444

Hopefully there's a reasonable fix - we don't have full control over what happens when Drupal form is submitted...
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) »
  • CiviCRM / Drupal User Registration Form Validation Issue

This forum was archived on 2017-11-26.