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

Ability to disable on some profile forms #28

Open
MtnPavlas opened this issue Nov 1, 2022 · 2 comments
Open

Ability to disable on some profile forms #28

MtnPavlas opened this issue Nov 1, 2022 · 2 comments

Comments

@MtnPavlas
Copy link

Is there a way to disable this on specific profile forms? I love having this capability enabled on event registration, donation and membership forms, but do want to have a dedicated form available for the users to deliberately update their first and last names. I'm thinking the easiest way might be a piece of javascript/jQuery to be included in the profile or profile field settings? Thanks for any pointers.

@twomice
Copy link
Collaborator

twomice commented Nov 2, 2022

Yes, it would be nice to support that option somehow. I'm open to a PR but will probably not have time to make that happen on my own very soon. If you make any progress and would like to submit a PR, please do, and I'll be glad to review/comment and/or merge. Thanks @MtnPavlas !

@MtnPavlas
Copy link
Author

Thanks, I'm not super strong with Civi so not sure how to make this configurable, but for my purposes, I simply updated the file noverwrite.php, line 6 from
$names = array ("CRM_Profile_Form_Edit","CRM_Event_Form_Registration_Register","CRM_Contribute_Form_Contribution_Main");
to
$names = array ("CRM_Event_Form_Registration_Register","CRM_Contribute_Form_Contribution_Main");

The above results in event registration and contribution forms to be protected, but any other forms will not - for our purposes that works better since when someone is editing a straight out profile (i.e., not on a contribution or event registration page), they are doing so deliberately with the objective to update all those fields on the profile.

While not a configurable solution, I hope this helps someone.

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

No branches or pull requests

2 participants