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

Added support for having acf join group form action use a dynamic civi group id #49

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

Conversation

wcha-peter
Copy link

Hi,

I was wanting support for more dynamic selection of the Civi group id that a user gets added to in the ACF Form Civi group join action, in my case for determining the group id from a custom field on the current WP post.

I've added an entry in the list of groups with ID 0 to avoid conflicting with any of the civi groups, and when the action runs had it get the id from a filter. Not sure if my GUI approach of having it in the existing list of groups is a great option but seemed like the simplest solution.

Best wishes,
Peter

@christianwach
Copy link
Owner

@wcha-peter Thanks for the PR but you can already do this without any code changes. Use {get_field:my_field} as per the ACF Extended docs.

Cheers, Christian

@wcha-peter
Copy link
Author

Hi @christianwach,

Not sure if this gives us the functionality we're looking for. I'm looking to dynamically pick the group to join, which seems to currently only have the option to select from the list of civi groups, not any dynamic values:
image

There is the option to put a dynamic tag in the 'Conditional On' field, but this leads to needing a group action for every group we want to interact with, which in our case is ~100, so would be good to have a way to pick the Group field dynamically.

Best wishes,
Peter

@christianwach christianwach reopened this Apr 5, 2023
@christianwach
Copy link
Owner

christianwach commented Apr 5, 2023

@wcha-peter Ah, sorry, I see what you mean. That field doesn't allow "magic tags" to be used. Converting the reference such that it does seems to be the way to go. I've re-opened this as a reminder.

@wcha-peter
Copy link
Author

@christianwach I've pushed an updated version of the changes which seem to be more in line with what you had in mind. I've just re-enabled the ui field for the groups field.

Please let me know if that's in line with what you were planning?

@wcha-peter wcha-peter reopened this May 16, 2023
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.

2 participants