- Posts: 41
- Thank you received: 0
Adding a new #__jd_donors column for a new Custom Field
- Dave
- Topic Author
- Offline
- Senior Member
Less
More
6 years 3 months ago #117134
by Dave
Adding a new #__jd_donors column for a new Custom Field was created by Dave
Hello. I used backend Custom Field tab to create a new Custom Field: 'district'.
The new 'district' field displays properly on my Donation Form.
The new 'district' field is present in the #__jd_fields table, but not present in the #__jd_donors table.
I manually added the new 'district' field to the #__jd_donors table, so that it would be part of my donor database and also available to call for reports.
Today I will try to confirm that a submitted Donation Form will successfully write user 'District' data to the #__jd_donors table.
1st question:
I notice that my new 'district' field is absent from the sql files contained in
root/administrator/components/com_jdonation/sql/ folder.
Does this mean that future updates will cause my new field and all of its data to vanish due to the update re-writing tables without my custom 'district' field?
2nd question:
If the new 'district' field exists in the Custom Field Tab, and is displayed on the Donation Form page, and is available as a new column in the #__jd_donors table, is anything else required for the JD system to write 'district' data into the jd_donors table at each Donation Form succeed?
I have searched your code to find specific write commands that specify writing fields into database columns, but I cannot find it.
Suggestions?
Thanks!
The new 'district' field displays properly on my Donation Form.
The new 'district' field is present in the #__jd_fields table, but not present in the #__jd_donors table.
I manually added the new 'district' field to the #__jd_donors table, so that it would be part of my donor database and also available to call for reports.
Today I will try to confirm that a submitted Donation Form will successfully write user 'District' data to the #__jd_donors table.
1st question:
I notice that my new 'district' field is absent from the sql files contained in
root/administrator/components/com_jdonation/sql/ folder.
Does this mean that future updates will cause my new field and all of its data to vanish due to the update re-writing tables without my custom 'district' field?
2nd question:
If the new 'district' field exists in the Custom Field Tab, and is displayed on the Donation Form page, and is available as a new column in the #__jd_donors table, is anything else required for the JD system to write 'district' data into the jd_donors table at each Donation Form succeed?
I have searched your code to find specific write commands that specify writing fields into database columns, but I cannot find it.
Suggestions?
Thanks!
Please Log in or Create an account to join the conversation.
- Mr. Dam
- Offline
- Administrator
Less
More
- Posts: 12822
- Thank you received: 1660
6 years 3 months ago #117144
by Mr. Dam
Replied by Mr. Dam on topic Adding a new #__jd_donors column for a new Custom Field
Hi Dave,
You can add any column into table: #__jd_donors, and this column won't be effect when you install newer Joom Donation version.
But you should modify the Donation layout (Both Back-end and Front-end) to show that field. And remember if you modify layout files, they will be overridden when you install newer Joom Donation version.
Thanks
Dam
You can add any column into table: #__jd_donors, and this column won't be effect when you install newer Joom Donation version.
But you should modify the Donation layout (Both Back-end and Front-end) to show that field. And remember if you modify layout files, they will be overridden when you install newer Joom Donation version.
Thanks
Dam
Please Log in or Create an account to join the conversation.
- Dave
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 41
- Thank you received: 0
6 years 3 months ago #117147
by Dave
Replied by Dave on topic Adding a new #__jd_donors column for a new Custom Field
Thanks!
Yes, I have modified layout files to show field. I keep a list of core-mods to repeat after update. I try to keep core-mods to a minimum.
2nd question:
Test transactions from localhost are not helpful.
I will have to go live to test complete site function.
Until then, I don't know if Donation-Form-Success will write data for new 'district' field to #__jd_donors table.
Can you help with that question?
If front-end Donation Form has a field for 'District',
and if #__jd_donors table has column for 'district',
will the JD app write the district data to the table after each Donation-Form success, or is some other code-step necessary?
I cannot test this until i go live. That is why I'm asking you.
Thx!
Yes, I have modified layout files to show field. I keep a list of core-mods to repeat after update. I try to keep core-mods to a minimum.
2nd question:
Test transactions from localhost are not helpful.
I will have to go live to test complete site function.
Until then, I don't know if Donation-Form-Success will write data for new 'district' field to #__jd_donors table.
Can you help with that question?
If front-end Donation Form has a field for 'District',
and if #__jd_donors table has column for 'district',
will the JD app write the district data to the table after each Donation-Form success, or is some other code-step necessary?
I cannot test this until i go live. That is why I'm asking you.
Thx!
Please Log in or Create an account to join the conversation.
- Mr. Dam
- Offline
- Administrator
Less
More
- Posts: 12822
- Thank you received: 1660
6 years 3 months ago #117315
by Mr. Dam
Replied by Mr. Dam on topic Adding a new #__jd_donors column for a new Custom Field
Hi,
Why don't you add new Custom field "District", i think that's the simplest way because the field will still be shown in Donation form and the entered value will be stored in database without any modifying.
Thanks
Dam
Why don't you add new Custom field "District", i think that's the simplest way because the field will still be shown in Donation form and the entered value will be stored in database without any modifying.
Thanks
Dam
Please Log in or Create an account to join the conversation.
Moderators: Mr. Dam, Dũng Nguyễn Việt
Support
Documentation
Information
Copyright © 2024 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.