![]() |
|
|
|||||||
| Register | FAQ | Top Posters | Members List | Calendar | Search | Today's Posts | Resend Activation Email | Mark Forums Read |
| dotProject Documentation | dotProject FAQ | Bugs & Feature Requests | Language Packs & Themes | Download dotProject |
| Customisation Questions 2.x How do you modify ..... for your own site |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Hello, i have added a field in the new event form
Code:
<td align="right"><?php echo $AppUI->_('Company');?>:</td>
<td>
<?php
echo arraySelect( $companies, 'company_id', 'size="1" class="text"', @$obj->company_name );
?>
</td>
Code:
require_once( $AppUI->getModuleClass ('companies' ) );
$row = new CCompany();
$companies = $row->getAllowedRecords( $AppUI->user_id, 'company_id,company_name', 'company_name' );
$companies = arrayMerge( array( '0'=>'' ), $companies );
Thanks ![]() |
|
#2
|
||||
|
||||
|
$companies = $row->getAllowedRecords ($AppUI->user_id, 'company_id,company_name', 'company_name', array('where' => 'company_type = 1'));
__________________
http://www.saki.com.au/ - The driving force behind dotProject Latest dotProject Release: 2.1.2 Download now Nightly Stable 2 Snapshot |
|
#3
|
|||
|
|||
|
thanks! You are great!
|
|
#4
|
|||
|
|||
|
Hello,
I want to add a new field named "countries" in the "new project". I tried to add this field just below the "companies" field. I have a made a seperate table for "countries", but I am not able to display the records from that table into the dropdown list. I have done everything same as that if companies for "countries"... |
|
#5
|
|||
|
|||
|
do you mean you have a table with the list of countries which you want in a drop down list??
if so you would do the following:- Select the information from your table Code:
$query_Magazine = "SELECT * FROM contries "; $options =db_exec( $query_Contries ); Next you need to loop the table out into a select list. PHP Code:
THe next step would be to select and option and send back the Contries_id back in an insert.. But you need to provied information about the relationship between the tables. Hope this helps? |
|
#6
|
|||
|
|||
|
thanks Krad fro your information.
my next question is, I want to save this country_id as a column name in the table "projects". I am trying to figure out where exactly they are saving all other data in the table. How shall I do this? |
|
#7
|
||||
|
||||
|
For each module there is a module.class.php file (where module is the name of the module), so if you wanted to manage what is being saved in projects, you would need to edit modules/projects/projects.class.php
__________________
http://www.saki.com.au/ - The driving force behind dotProject Latest dotProject Release: 2.1.2 Download now Nightly Stable 2 Snapshot |
|
#8
|
|||
|
|||
|
Thank you very much. In case of more queries, I will come back to you..
|
|
#9
|
|||
|
|||
|
Thanks ajdonnison,
Now, what if, I want to display this newly saved field in the list of all projects (table)? Do I have to change modules/projects/in dex.php? Or which file do I have to change? |
|
#10
|
|||
|
|||
|
I tried to change page "admin_tab.viewuser.projects.php" for adding a column named "country" to projects list; but the changes were not reflected in the page. I do not understand which file is displaying the page of projects list.
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|