Mapping fields from Ninja Form to GiveWP Form #7224
-
Hello, I am referred here by Premium support. So, we are creating giveWP form using ninja form create post action. We follow this documentation https://givewp.com/create-a-peer-to-peer-fundraising-campaign-with-givewp/ to create giveWP form using ninja form Post creation Addon. We successfully created giveWP form and map few fields on giveWP from ninja form like _give_set_goal, _give_custom_amount_minimum, _give_goal_option, _give_form_template etc. We have new requirements on this action to add new donation email recipient. To add an email recipient there is a meta_key "_give_new-donation_recipient" which is not working. So please let us know how we can add donation email recipient so we can add team captain as recipient on giveWP form to get notification emails. If there is any code snippet or we are using wrong meta_key? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
The '_give_new-donation_recipient' => [
'email' => get_bloginfo('admin_email'),
], This array is serialized for storage in the database:
To set a custom recipient, you'll need to set the serialized string as the value of the meta:
Note that in the above example |
Beta Was this translation helpful? Give feedback.
-
Hello,
Sorry for the late reply. I thought I had already sent this out.
The issue we are having is that the email we want to
dynamically insert into the form isn't fixed. It is an email address that
the user inputs when setting up their team page.
The form is this one: https://walknroll.americanstroke.org/create-your-team/
You can view the screenshots attached to see where the user enters their
email and where that email address needs to go on the corresponding GiveWP
Donation form.
(If you have trouble with the attachments, let me know and I can send a
Dropbox link to access them.)
Let me know if you have any additional insights and questions that might
help us resolve this issue.
Thanks.
Craig
…On Thu, Feb 8, 2024 at 10:40 AM Kyle B. Johnson ***@***.***> wrote:
To add an email recipient there is a meta_key
"_give_new-donation_recipient" which is not working.
The _give_new-donation_recipient meta expects a keyed array:
'_give_new-donation_recipient' => [
'email' => get_bloginfo('admin_email'),
],
This array is serialized for storage in the database:
***@***.***";}"
To set a custom recipient, you'll need to set the serialized string as the
value of the meta:
***@***.***";}"
Note that in the above example s:23 specifies that the email address is 23
characters, which is how PHP parses the serialized string, so you can't
just copy/paste and change the email. You will need to set the string
character length as well.
—
Reply to this email directly, view it on GitHub
<#7224 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AYIYUCNZIGO5TAJF4A27D2TYST5YRAVCNFSM6AAAAABC6DEUUCVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DIMBZG44DM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
Craig Bittner
*Open Source Idea Generation Network*
http://osign.org
m: 816.824.6873
2401 Summit
Kansas City, MO 64108
|
Beta Was this translation helpful? Give feedback.
-
After successfully creating/publishing the new post(give_forms) via Ninja...are you seeing a fully rendered donation form (including your goal amount, recurring, custom amount, etc/whatever meta values you passed from your frontend form, etc)? Do you have any other function that is automatically updating the new post/give_forms so that it does render fully on the frontend and populate the applicable database tables, etc? |
Beta Was this translation helpful? Give feedback.
The
_give_new-donation_recipient
meta expects a keyed array:This array is serialized for storage in the database:
"a:1:{s:5:"email";s:20:"[email protected]";}"
To set a custom recipient, you'll need to set the serialized string as the value of the meta:
"a:1:{s:5:"email";s:23:"[email protected]";}"
Note that in the above example
s:23
specifies that the email address is23
characters, which is how PHP parses the serialized string, so you can't just copy/paste and change the email. You will need to s…