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) »
  • Some contribution fields emptied if form fails validation
Pages: [1]

Author Topic: Some contribution fields emptied if form fails validation  (Read 776 times)

TwoMice

  • I post frequently
  • ***
  • Posts: 214
  • Karma: 16
    • Emphanos
  • CiviCRM version: Always current stable version
  • CMS version: Drupal 7
Some contribution fields emptied if form fails validation
February 10, 2012, 11:41:06 am
Hi gang,

When I create or edit a contribution, if the submitted form fails validation, the form re-loads and (most) fields are re-populated with the data I entered -- as expected.  Some fields, however, are not re-populated with the entered data; instead they're populated with the stored data (or empty if I'm creating a new contribution).

I can see this happening on http://drupal.demo.civicrm.org and http://sandbox.drupal.civicrm.org. 

Any ideas?

- Allen
Please consider contributing to help improve CiviCRM with the Make it Happen! initiative.

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: Some contribution fields emptied if form fails validation
February 10, 2012, 12:32:42 pm

hey allen:

which fields exhibit this behavior?

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

TwoMice

  • I post frequently
  • ***
  • Posts: 214
  • Karma: 16
    • Emphanos
  • CiviCRM version: Always current stable version
  • CMS version: Drupal 7
Re: Some contribution fields emptied if form fails validation
February 10, 2012, 01:01:00 pm
Sorry, forgot to mention that.  All fields from the top of the form down to and including "Donor information > Known areas of interest" work as expected. Fields below this point are exhibiting the problem behavior.

I'm guessing it's related to the fact that these sub-sections are populated via AJAX calls (e.g., http://drupal.demo.civicrm.org/civicrm/contact/view/contribution?snippet=4&formType=Premium).  That's just a guess, though, as that method seems to be working fine in other places (particpants, etc.)

- A.
Please consider contributing to help improve CiviCRM with the Make it Happen! initiative.

TwoMice

  • I post frequently
  • ***
  • Posts: 214
  • Karma: 16
    • Emphanos
  • CiviCRM version: Always current stable version
  • CMS version: Drupal 7
Re: Some contribution fields emptied if form fails validation
February 16, 2012, 02:36:40 pm
I've not had a chance to make any headway debugging this -- should I at least create an issue for it?
Please consider contributing to help improve CiviCRM with the Make it Happen! initiative.

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: Some contribution fields emptied if form fails validation
February 16, 2012, 03:22:21 pm

yes you should :) Can u please do so and assign the issue to kurund :)

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) »
  • Some contribution fields emptied if form fails validation

This forum was archived on 2017-11-26.