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

Disable also fields with no value #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

magnolia61
Copy link
Contributor

Since the middle name is sometimes populated and sometimes not, but in the form we do not want people to change it, we needed to change this.
This PR will change the behavior so that fields with or without a value will be disabled.

@twomice
Copy link
Collaborator

twomice commented Mar 30, 2023

Sorry, it has been a long time since you submitted this @magnolia61 .

I'm concerned that this PR will change a significant functionality of the extension: currently, empty fields are not frozen, but this PR would freeze them.

Site admins will probably be surprised by this change, and surely some of them will not want this behavior.

Pinging @Stoob and @tttp -- do you have opinions on the advisability of freezing First, Middle, and Last Name fields when they are empty?

@Stoob
Copy link

Stoob commented Mar 30, 2023

Two questions:

  1. @twomice would this 'freeze empty' field affect only the Middle Name field?
  2. is it possible to make this patch a optional non-default setting? This is possible in the webform_civicrm module for example.

My argument against this patch that it is specifically the opposite use case that most clients want in my experience. They do want the name fields filled in if names are blank.

@twomice
Copy link
Collaborator

twomice commented Mar 30, 2023

@Stoob As written, this patch would apply the "freeze even if empty" behavior to all relevant fields (i.e. first, last, middle). I agree, making this a configurable option would remove potential surprises for existing users. Someone would have to make significant improvements in the PR to support that.

Great feedback on the use case, thanks!

I'm inclined not to merge this PR as-is. If someone wants to try a PR that makes this a configurable option, I'd be open to merging that.

@Stoob
Copy link

Stoob commented Mar 30, 2023

One possible workaround option @magnolia61 here is making the name fields read-only within the CiviCRM profile. If you are exclusively using the checksum token, and you do not want the names changes or filled in, this should do it.

@composerjk
Copy link

It definitely seems surprising to have the first and last name fields frozen while the empty middle name field is not.

Perhaps there are cases where one would want to fill in those empty fields when using no overwrite; the use case I was looking into was for event registration where we also make available the middle name field for our contacts.

@tttp
Copy link
Member

tttp commented Jul 8, 2024

hi,
I'm sure middle name wasn't handled like the first and last name for a single reason: we didn't enable the middle name field (or add it to profile), I'd consider it a bug and it should be added.

I'm not sure what's the benefit of bundling with that fix a change of behaviour (freeze empty fields), would it work for everyone to have a minimal "fix only" change and handle middle name as the rest and keep the existing behaviour?

@tttp
Copy link
Member

tttp commented Jul 8, 2024

for @twomice and @Stoob, if you want to migrate this extension to gitlab and take the maintenance, that might be the best option...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants