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

Smarty notice fix on trackingFields #25614

Closed

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Fixes the top one of these

image

@civibot
Copy link

civibot bot commented Feb 18, 2023

(Standard links)

@civibot civibot bot added the master label Feb 18, 2023
@@ -7,7 +7,7 @@
| and copyright information, see https://civicrm.org/licensing |
+--------------------------------------------------------------------+
*}
{if $trackingFields and ! empty($trackingFields)}
{if array_key_exists('trackingFields', $form) and !empty($trackingFields)}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this make sense?
Also I can't find where trackingFields is ever defined?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was an old 'good idea' by Lobo - I was tempted to just pull them out & see if anyone noticed ...

https://civicrm.org/blog/lobo/tracking-contributions-and-event-registrations-for-campaigns-and-appeals

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't find any universe refs & apparently Wikimedia was the original 'client'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The case for removing them from message templates seems very strong....

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to implement this, this week. I didn't know about $trackingFields, but I did pass values via the URL.

$trackingFields hides the fields from the form and receipt. My client was OK with the fields being visible and they use custom receipts. Otherwise, if I knew about this feature, I'd have used it.

I once proposed custom fields of type "hidden", which would solve this and more.

Thinking ahead - FormBuilder can populate fields from the URL without displaying them. Though I doubt anyone's figured out receipts when FB can process payments...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MegaphoneJon I guess that suggests that maybe someone else might use them if they are useful.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also - wouldn't it be a case of adding is_hidden to the field - which then starts to ask if we should use visibility better ....

@eileenmcnaughton
Copy link
Contributor Author

I'm gonna close this for now - it's not quite clear if this is right or not at the momen

@colemanw
Copy link
Member

@eileenmcnaughton see #27233

@colemanw
Copy link
Member

I once proposed custom fields of type "hidden", which would solve this and more.

@MegaphoneJon how about something like this? #27235

@eileenmcnaughton eileenmcnaughton deleted the smarty_notice_fix branch December 28, 2023 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants