Cannot export CUSTOM donor data. #7127
Unanswered
jobst
asked this question in
Developer Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This question/problem is related to EXPORTING custom fields collected in donation forms (donor AND donation meta).
Doing this using code.
Reason for not using Form Manager:
Poltical donations in Australia are littered with laws (and dangers/litigations).
We need to be careful how we present the donations and what we require as data, using form manager this can be tricky to achieve.
My aim:
To provide custom fields for donations AND donors to have them added to the database, displayed in the donations/donor listings on the website AND exported to CSV.
One goal achieved:
I have my goal achieved for donations, I present the questions in the forms, store the recevied data in the DB and present the data in the donations listing (using the example in https://github.com/impress-org/givewp-snippet-library/blob/master/form-customizations/custom-fields-plugin.php) and can export them to CSV.
My problem:
While I can present the donor related questions in the donation forms, store them in the database (can see data using phpMyAdmin), present them in the website listing - I cannot export the DONOR data to CSV.
This might be a bug or me doing it incorrectly, your help is appreciated.
My code and how I am doing it:
I followed the example provided in
https://github.com/impress-org/givewp-snippet-library/blob/master/donors/add-donor-meta.php
I have more fields, but for this report I ONLY show one.
Presenting the field, it shows up and I can type into the field.
Making sure it shows an error if not filled, this works too:
Add field to database, this works too as I can see it properly set in the DB using phpMyAdmin.
Show donor information in the donor listing, this works too
Show check boxes in the 'EXPORT DONORS' section inside the TOOLS tab.
This works, I can see the check box
This is the part that does NOT work.
The data is never exported, also the error message never shows up in the PHP log.
Not sure what the problem is, I followed the guidelines provided in
https://github.com/impress-org/givewp-snippet-library/blob/master/donors/add-donor-meta.php
Beta Was this translation helpful? Give feedback.
All reactions