pturkowski
Newbie
Karma: 0
Posts: 5
|
 |
« on: January 01, 2012, 01:10:28 PM » |
|
First, I have to say, that phpScheduleIt really rocks!
Second, I have a question. I'm begginer/intermediate in PHP, but i can write some code. I'd like to add some fields in the reservation form, and that would be: 2x checkbox, 3x textinput box, 1x select box. Which files need to be modified (aside from reserve.template.php and from creating few rows in DB) to have this additional information shown on reservation (afters it's done) and to be able to include these new fields in search ? And which file contains the MySQL command with adding/editing/deleting rows ?
Thank you in advance for your help.
|
|
|
|
|
Logged
|
|
|
|
|
|
pturkowski
Newbie
Karma: 0
Posts: 5
|
 |
« Reply #2 on: January 03, 2012, 02:41:46 AM » |
|
Thank you very much. This is exactly what I needed.
|
|
|
|
|
Logged
|
|
|
|
pturkowski
Newbie
Karma: 0
Posts: 5
|
 |
« Reply #3 on: January 03, 2012, 03:52:11 PM » |
|
Ok, i've managed to add 9 more fields with the developer's guide. My question now is: how to put them all in a new container ? Where does it need to be defined ?
|
|
|
|
|
Logged
|
|
|
|
robpet72
Jr. Member

Karma: 1
Posts: 55
|
 |
« Reply #4 on: January 05, 2012, 08:55:37 PM » |
|
Why do you need to put them in a container? If you followed the guide, they can all be variables that are populated and retrieved individually.
If you can explain a little better what you are trying to do, we can try to help you.
|
|
|
|
|
Logged
|
|
|
|
pturkowski
Newbie
Karma: 0
Posts: 5
|
 |
« Reply #5 on: January 09, 2012, 02:39:07 AM » |
|
Maybe not in a container but in another Tab. I have like 10-20 new fields, and I'd really like to have them grouped, rather then to scroll them all in the first tab. I thought that Tab = container here.
|
|
|
|
|
Logged
|
|
|
|
robpet72
Jr. Member

Karma: 1
Posts: 55
|
 |
« Reply #6 on: January 09, 2012, 02:22:11 PM » |
|
I think this might be a Nick question to answer, but I would think that if you used (for example) the "Groups" area, and changed the code to use your fields, then it might work. That's how data can be added in a separate tab.
In my cases, where I add quite a few new fields, I put it all in one spot. I find my users need things all in one spot as opposed to having to find more info in another spot.
But as I said, Nick might have a better idea.
|
|
|
|
|
Logged
|
|
|
|
Nick
Administrator
Hero Member
   
Karma: 15
Posts: 5419
|
 |
« Reply #7 on: January 17, 2012, 01:49:05 PM » |
|
This is unfortunately a bit tricky in 1.2.
Nearly all of your changes would be in templates/reserve.template.php. You'd pretty much copy what's being done for accessories (new td after line 59 and a new method to print the div).
Then just call the method to print the div from print_res() in lib/Reservation.class.php
|
|
|
|
|
Logged
|
|
|
|
asterxiang
Newbie
Karma: 0
Posts: 6
|
 |
« Reply #8 on: April 05, 2012, 06:02:49 PM » |
|
Is there any guidelines for how to do this in version 2.0.2/2.1(just downloaded the preview 2.1 verison)? It looks to me that a lot of things (tables in database, and php files) have changed from the version when the instruction was written. For example, in step 2, /lib/db/ResDB.class.php. doesn't exist in what I downloaded for 2.0.2. So I really don't know how to start.
I really like phpScheduleIt and it really worked! But we have to add some fields to the reservation page.
Anyone can give some hint?
Thanks in advance!
|
|
|
|
|
Logged
|
|
|
|
Nick
Administrator
Hero Member
   
Karma: 15
Posts: 5419
|
 |
« Reply #9 on: April 10, 2012, 09:06:56 AM » |
|
One of the big features in the 2.2 release will be the ability to add custom fields without any code. If you're ok waiting for that release, I'd suggest that.
|
|
|
|
|
Logged
|
|
|
|
asterxiang
Newbie
Karma: 0
Posts: 6
|
 |
« Reply #10 on: April 10, 2012, 11:41:01 AM » |
|
Thank you Nick! Do you have any idea when 2.2 will be released?
|
|
|
|
|
Logged
|
|
|
|
Nick
Administrator
Hero Member
   
Karma: 15
Posts: 5419
|
 |
« Reply #11 on: April 12, 2012, 02:33:39 PM » |
|
My rough estimate would be mid to late May.
|
|
|
|
|
Logged
|
|
|
|
|