Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Afform - fix contact source field & field defaults #21228

Merged
merged 2 commits into from
Aug 23, 2021

Conversation

colemanw
Copy link
Member

@colemanw colemanw commented Aug 23, 2021

Overview

2 minor Afform bugfixes:

  1. Contact source is supposed to take its default from the afform title but was broken
  2. Field defaults were saving incorrectly for some fields

Before

Adding a contact to a form would get a blank value for Source.
Fields defaults with numeric keys (e.g. location type id) were saving as integers instead of strings.

After

Source stays in sync with the Afform title unless manually edited.
Fields defaults set correctly, plus added a helpful "Default Value" title to the dropdown:
Screenshot from 2021-08-23 16-25-24

Contact source is supposed to take its default from the afform title
This fixes it to initialize with the title and keep in sync.
@civibot
Copy link

civibot bot commented Aug 23, 2021

(Standard links)

@civibot civibot bot added the master label Aug 23, 2021
String comparison was failing for integer keys.
@colemanw colemanw changed the title Afform - fix contact source field Afform - fix contact source field & field defaults Aug 23, 2021
@seamuslee001
Copy link
Contributor

Tested this and worked fine

@seamuslee001 seamuslee001 merged commit fe17f11 into civicrm:master Aug 23, 2021
@seamuslee001 seamuslee001 deleted the afformFixTitle branch August 23, 2021 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants