Written Communications Adding Profile Fields

If you aren't speaking german, you can ask for support or post your request here.
Antworten
christiec
Beiträge: 8
Registriert: 6. Jul 2022, 23:14

Written Communications Adding Profile Fields

Beitrag von christiec »

Hello,

I am trying to register more profile fields in the Written Communications plugin to use with a docx template I created. I have been trying to follow the documentation at https://www.admidio.org/dokuwiki/doku.p ... unications, but haven't had any luck so far. I would like to add fields for our membership type and the amount owed. In the instructions in the config.php file it says, "To define additional profile fields as a value in the array, the value of "usf_name_intern" of the table user_fields must be used!" I am not sure what this means and if this is why adding the arrays is not working? The following is what I tried to add to the config.php file. Thanks in advance for any help!

$plg_wc_arrCustomProfileFields = array('MembershipCategory' => 'MEMBERSHIP_CATEGORY');
$plg_wc_arrCustomProfileFields = array('MembershipType' => 'MEMBERSHIP_PAYMENT');
$plg_wc_arrCustomProfileFields = array('Fee' => 'FEE1');
$plg_wc_arrCustomProfileFields = array('DueDate' => 'DUEDATE1');
$plg_wc_arrCustomProfileFields = array('FirstName' => 'FIRST_NAME');
Benutzeravatar
fasse
Administrator
Beiträge: 5490
Registriert: 12. Nov 2005, 16:06

Re: Written Communications Adding Profile Fields

Beitrag von fasse »

Hi,

please try the following syntax:

Code: Alles auswählen

$plg_wc_arrCustomProfileFields = array('MembershipCategory' => 'MEMBERSHIP_CATEGORY', 'MembershipType' => 'MEMBERSHIP_PAYMENT', 'Fee' => 'FEE1', 'DueDate' => 'DUEDATE1', 'FirstName' => 'FIRST_NAME');
The variable $plg_wc_arrCustomProfileFields should only declared once.

Best regards
Fasse
christiec
Beiträge: 8
Registriert: 6. Jul 2022, 23:14

Re: Written Communications Adding Profile Fields

Beitrag von christiec »

Thank you, Fasse. I tried that but was given the following error, any suggestions?

[20-Jul-2022 10:56:04 America/Los_Angeles] PHP Fatal error: Uncaught Error: Call to a member function fetch() on bool in /home/customer/www/arcgh.org/public_html/admidio/adm_plugins/written_communications/classes/adm_RoleMembers.php:194
Stack trace:
#0 /home/customer/www/arcgh.org/public_html/admidio/adm_plugins/written_communications/written_communications_functions.php(181): RoleMembers->getRoleMembers()
#1 {main}
thrown in /home/customer/www/arcgh.org/public_html/admidio/adm_plugins/written_communications/classes/adm_RoleMembers.php on line 194
christiec
Beiträge: 8
Registriert: 6. Jul 2022, 23:14

Re: Written Communications Adding Profile Fields

Beitrag von christiec »

Hi Fasse,

I checked my database and found, through trial and error, that the 'first name' category was what was giving the error. I removed it and am using 'recipient name' instead.

Thank you,

Christie
Antworten