[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-developers] Trouble with forms
From: |
Brian Johnson |
Subject: |
[Phpgroupware-developers] Trouble with forms |
Date: |
Wed, 14 Aug 2002 15:45:52 +0000 |
I'm trying to add a field to the catagory table in the timetrack module and am
having trouble figuring out the form to edit the catagories under the admin
module
Currently, it allows you to edit the catagory name in an input box and hit
enter to
submit it. I would like to be able to edit the two fields in the same manner.
I need two forms (each one with one input box) or I need a submit button - tell
me
if I'm wrong on this
I have:
echo '<form method=POST action="'
. $GLOBALS['phpgw']->link("/timetrack/admin3.php","cat_id=" .
$catagory_id . "&mode=accept") . '">';
echo '<td><input name="cat_name" value="' . $catagory_name .
'"></td>';
echo '</form>';
echo '<form method=POST action="'
. $GLOBALS['phpgw']->link("/timetrack/admin3.php","cat_id=" .
$catagory_id . "&mode=accept") . '">';
echo '<td><input name="multi1" value="' . $multi . '"></td>';
echo '</form>';
$GLOBALS['phpgw']->db->query("update phpgw_ttrack_wk_cat set
catagory_desc='$cat_name' "
. ", billout_multiplier='$multi1' where
work_catagory_id='$cat_id'");
It defaults to display the current values properly, but if I hit enter in one
box
(accept on one form), the value of the other input box is set to null - not the
default value
Otherwise, it works as expected (the edited value is changed properly).
How can I make coding to get the second input box to not reset the current
value?
PS - yes I know catagory is spelt incorrectly
- [Phpgroupware-developers] Trouble with forms,
Brian Johnson <=
- Re: [Phpgroupware-developers] Trouble with forms, Chris Weiss, 2002/08/14
- Re: [Phpgroupware-developers] Trouble with forms, Brian Johnson, 2002/08/14
- Re: [Phpgroupware-developers] Trouble with forms, Chris Weiss, 2002/08/14
- Re: [Phpgroupware-developers] Trouble with forms, Brian Johnson, 2002/08/14
- Re: [Phpgroupware-developers] Trouble with forms, Chris Weiss, 2002/08/14
- Re: [Phpgroupware-developers] Trouble with forms, Brian Johnson, 2002/08/14