- Posts: 12
- Thank you received: 0
Adding "Title Field" to form, shows up everywhere
- Avi
- Topic Author
- Offline
- New Member
-
Less
More
12 years 9 months ago #22848
by Avi
Adding "Title Field" to form, shows up everywhere was created by Avi
Hi,
Can you please help me figuring out the structure of the extension? I would like to add a field called "Title" to the form, but as more than just a custom field. I want it to show up in the admin panel, on emails, etc. I'm familiar enough with PHP in general to do the coding, I just don't know which files I need to hunt down. Thanks!
Can you please help me figuring out the structure of the extension? I would like to add a field called "Title" to the form, but as more than just a custom field. I want it to show up in the admin panel, on emails, etc. I'm familiar enough with PHP in general to do the coding, I just don't know which files I need to hunt down. Thanks!
Please Log in or Create an account to join the conversation.
- Avi
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 12
- Thank you received: 0
12 years 9 months ago #22859
by Avi
Replied by Avi on topic Re: Adding "Title Field" to form, shows up everywhere
I've made progress but got stuck in one place. Here is how I added the "Title" field:
1) In phpMyadmin, navigate to suffix_jd_donors (where "suffix" is your table suffix) and add a cell called "title". I added mine right before first_name, made it varchar 50, not null, untf8_unicode_ci
Note: I'm using the jdform plugin for my forms, but the same logic should apply to the component as well
2) Open plugins/content/jdform and edit jdform.php, as well as jdform/default.php. I searched for every instance of "first" (which brought up the first name fields), and duplicated those entire lines and changed "firstname" (or whatever) to "title", this way I matched the developer's structure. If done correctly, this will allow users to enter a title and have it send to the db.
3) Open administrator/components/com_jdonation and edit views/donors/tmpl/default.php. Using the same logic, I found every instance of "first" and replicated it with "title". This allows me to view the donors' titles in the Joomla backend.
Where I'm stuck is the csv export of the donors list. How can I add my title field to this file? Where is the file getting generated? Thanks! :woohoo:
1) In phpMyadmin, navigate to suffix_jd_donors (where "suffix" is your table suffix) and add a cell called "title". I added mine right before first_name, made it varchar 50, not null, untf8_unicode_ci
Note: I'm using the jdform plugin for my forms, but the same logic should apply to the component as well
2) Open plugins/content/jdform and edit jdform.php, as well as jdform/default.php. I searched for every instance of "first" (which brought up the first name fields), and duplicated those entire lines and changed "firstname" (or whatever) to "title", this way I matched the developer's structure. If done correctly, this will allow users to enter a title and have it send to the db.
3) Open administrator/components/com_jdonation and edit views/donors/tmpl/default.php. Using the same logic, I found every instance of "first" and replicated it with "title". This allows me to view the donors' titles in the Joomla backend.
Where I'm stuck is the csv export of the donors list. How can I add my title field to this file? Where is the file getting generated? Thanks! :woohoo:
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
12 years 8 months ago #22918
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Adding "Title Field" to form, shows up everywhere
Hi
Look at the file administrator/components/com_jdonation/controller.php, find the csv_export function and you should be able to add the field to the export result .
Tuan
Look at the file administrator/components/com_jdonation/controller.php, find the csv_export function and you should be able to add the field to the export result .
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.