Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • C CiviCRM Core
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,372
    • Issues 1,372
    • List
    • Boards
    • Service Desk
    • Milestones
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Development
  • CiviCRM Core
  • Issues
  • #246
Closed
Open
Created Jul 09, 2018 by beto_aveiga@beto_aveiga

Avoid overwrite only first field with last value for fields with multiple values

Overview

Webforms with multiple emails values are not being saved correctly. The last submitted value is written to the first email field. Other emails are not being updated.

Before

  1. Data before submission image

  2. Example configuration of the webform image

  3. Data when visiting the webform image

  4. Filling the webform with a second email image

  5. Visiting the webform again we can see that first email was overwritten with last email image

  6. From the Admin UI it confirms what the webform was showing: first email overwritten with last email. image

After

  1. Repeat steps 1 to 4 from "Before" for initial data, filling the webform and saving.

  2. Data was stored correctly. image

Technical Details

  • Attaching exported webform with node export: webform-multiple-emails.txt

  • Site created for testing with civibuild using this command civibuild create civi12 --type drupal-demo --civi-ver 4.7.27 --url http://civi12 --web-root /home/beto/buildkit/build/civi12

  • CiviCRM currently uses civicrm_webform 7.20, however this module was replaced with the last version found here https://github.com/colemanw/webform_civicrm

Comments

Base on the modifed code (shown below) this is probably not only applicable to emails but for fields which are not addresses. image

Edited Jul 10, 2018 by beto_aveiga
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking