- Posts: 5
- Thank you received: 0
Custom field hidden on donation form
- Azriel
- Topic Author
- Offline
- New Member
-
Less
More
12 years 6 months ago - 12 years 6 months ago #27013
by Azriel
Custom field hidden on donation form was created by Azriel
Hello,
First of all I would like to say, I this extension is great, it is perfect for everything my community needs.
The main reason for my post however, I would like to add a custom field (expiry date) that will be visible in the back-end under each donor, and visible on the donors list, but not an option that can be chosen by the donor themselves, and therefore not visible on the donation form.
I am only in the beginning stages of learning how to write php and html ... well i can edit but not write it from scratch yet. Is there any kind of coding i could put into the php files that would allow me to do this. For example an if / else statement.
Thanks in advance for any help given
- Azriel
First of all I would like to say, I this extension is great, it is perfect for everything my community needs.
The main reason for my post however, I would like to add a custom field (expiry date) that will be visible in the back-end under each donor, and visible on the donors list, but not an option that can be chosen by the donor themselves, and therefore not visible on the donation form.
I am only in the beginning stages of learning how to write php and html ... well i can edit but not write it from scratch yet. Is there any kind of coding i could put into the php files that would allow me to do this. For example an if / else statement.
Thanks in advance for any help given
- Azriel
Last edit: 12 years 6 months ago by Azriel.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
12 years 6 months ago #27021
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Custom field hidden on donation form
Hi Azriel
I think you will need to know Joomla programming to do that. Basically, you will need to :
1. Add a field field (maybe named it as exp_date) into #__jd_donors table to store the expired date which you entered.
2. Edit the file administrator/components/com_jdonation/views/donor/tmpl/default.php, add a calendar field so that admin can choose the exp date for the donation record.
3. Edit the file administrator/components/com_jdonation/views/donors/tmpl/default.php to display the data (on donors list page).
Hope that help !
Tuan
I think you will need to know Joomla programming to do that. Basically, you will need to :
1. Add a field field (maybe named it as exp_date) into #__jd_donors table to store the expired date which you entered.
2. Edit the file administrator/components/com_jdonation/views/donor/tmpl/default.php, add a calendar field so that admin can choose the exp date for the donation record.
3. Edit the file administrator/components/com_jdonation/views/donors/tmpl/default.php to display the data (on donors list page).
Hope that help !
Tuan
Please Log in or Create an account to join the conversation.
- Azriel
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 5
- Thank you received: 0
12 years 6 months ago - 12 years 6 months ago #27103
by Azriel
Replied by Azriel on topic Re: Custom field hidden on donation form
Thanks a lot for your fast response and for your help. I have tried what you said, added a new field to the database, and checked that the database has full access rights, but for some reason it is still not saving the information. I have also edited each file with a "created_date" to also include:
Everything else s working as it should, it is displaying and the calendar lets you choose a date, but i can't figure out why it won't save.
Code:
$row->exp_date = date('Y-m-d H:i:s');
Last edit: 12 years 6 months ago by Azriel.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
12 years 6 months ago #27128
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Custom field hidden on donation form
Hi Azriel
There must be something wrong with your code and you will need to find a developer to help you in this case. I am afraid of I could not help you more, I am too busy these days.
Also, maybe you should upload the file administrator/components/com_jdonation/tables/jdonation.php here so that I can have a look at it. Not sure what version of Joom Donation you are using but if you are using old version, you will need to edit code in that field as well to add the field to one class.
Tuan
There must be something wrong with your code and you will need to find a developer to help you in this case. I am afraid of I could not help you more, I am too busy these days.
Also, maybe you should upload the file administrator/components/com_jdonation/tables/jdonation.php here so that I can have a look at it. Not sure what version of Joom Donation you are using but if you are using old version, you will need to edit code in that field as well to add the field to one class.
Tuan
Please Log in or Create an account to join the conversation.
- Azriel
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 5
- Thank you received: 0
12 years 6 months ago - 12 years 6 months ago #27231
by Azriel
Replied by Azriel on topic Re: Custom field hidden on donation form
Thanks a lot you have been very helpful already.
here is the file you requested.
edited ...
ok for some reason it isn't letting me add an attachment I will copy and paste the file here instead.
here is the file you requested.
edited ...
ok for some reason it isn't letting me add an attachment I will copy and paste the file here instead.
Code:
<?php
/**
* @version 3.1
* @package Joomla
* @subpackage Joom Donation
* @author Tuan Pham Ngoc
* @copyright Copyright (C) 2010 Ossolution Team
* @license GNU/GPL, see LICENSE.php
*/
defined('_JEXEC') or die ;
/**
* Jdonation table class
*
* @package Joomla
* @subpackage Jdonation
* @since 1.5
*/
class TableJdonation extends JTable
{
/**
* Constructor
*
* @param object Database connector object
* @since 1.5
*/
function __construct(& $db) {
parent::__construct('#__jd_donors', 'id', $db);
}
}
/**
* Campaign table class
*
* @package Joomla
* @subpackage Jdonation
* @since 1.5
*/
class CampaignJdonation extends JTable
{
/**
* Constructor
*
* @param object Database connector object
* @since 1.5
*/
function __construct(& $db) {
parent::__construct('#__jd_campaigns', 'id', $db);
}
}
/**
* Field table class
*
*/
class FieldJdonation extends JTable
{
/**
* Constructor
*
* @param object Database connector object
* @since 1.5
*/
function __construct(& $db) {
parent::__construct('#__jd_fields', 'id', $db);
}
}
/**
* Plugin table class
*
*/
class PluginJDonation extends JTable
{
/**
* Constructor
*
* @param object Database connector object
* @since 1.5
*/
function __construct(& $db) {
parent::__construct('#__jd_payment_plugins', 'id', $db);
}
}
/**
* Event Table Class
*
*/
class ConfigJDonation extends JTable
{
/**
* Constructor
*
* @param object Database connector object
* @since 1.5
*/
function __construct(& $db) {
parent::__construct('#__jd_configs', 'id', $db);
}
}
Last edit: 12 years 6 months ago by Azriel.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
12 years 5 months ago #27314
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Custom field hidden on donation form
Hi
Everything seems to be OK. Not sure why it cannot be saved. You can submit a support ticket sending me administrator and FTP account of your site. I will try to help you to check to see why the data is not saved.
Tuan
Everything seems to be OK. Not sure why it cannot be saved. You can submit a support ticket sending me administrator and FTP account of your site. I will try to help you to check to see why the data is not saved.
Tuan
Please Log in or Create an account to join the conversation.
- Azriel
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 5
- Thank you received: 0
12 years 5 months ago #27508
by Azriel
Replied by Azriel on topic Re: Custom field hidden on donation form
Thank you very much, sorry i haven't replied for a few days, i have been off the internet for a while.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
12 years 5 months ago #27750
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Custom field hidden on donation form
Update: We worked together via support ticket and got it all working fine now !
Tuan
Tuan
Please Log in or Create an account to join the conversation.
Moderators: Dang Thuc Dam, Dang Dam
Support
Documentation
Information
Copyright © 2025 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.